Re: [R] Writing R package and do.call

2009-03-02 Thread Rob Foxall
Thanks Rolf, I used your solution in my original, actual function and it worked very fine and a much more sophisticated solution than what I originally came up with! Thanks to the other people who replied as well -- I know that the message said it was a "Note" rather than a "Warning", but it sound

Re: [R] Writing R package and do.call

2009-03-02 Thread Gabor Grothendieck
Try this: temp.fn.2 <- function(mean = 0, sd = 1, n = 101) { x <- seq(mean - sd, mean + sd, length = n) plot(x, dnorm(x), type = "l") } # test temp.fn.2() On Mon, Mar 2, 2009 at 8:46 PM, Rob Foxall wrote: > Dear R-Help, > > I have written a function, which in simplified format can be repr

Re: [R] Writing R package and do.call

2009-03-02 Thread hadley wickham
On Mon, Mar 2, 2009 at 7:46 PM, Rob Foxall wrote: > Dear R-Help, > > I have written a function, which in simplified format can be represented as: > > temp.fn <- function(my.mean,my.sd){ >   Parameters <- list(mean = my.mean, sd = my.sd) >   curve(do.call(dnorm,c(list(x), Parameters)), from = my.me

Re: [R] Writing R package and do.call

2009-03-02 Thread Rolf Turner
On 3/03/2009, at 2:46 PM, Rob Foxall wrote: Dear R-Help, I have written a function, which in simplified format can be represented as: temp.fn <- function(my.mean,my.sd){ Parameters <- list(mean = my.mean, sd = my.sd) curve(do.call(dnorm,c(list(x), Parameters)), from = my.mean-my.sd,

[R] Writing R package and do.call

2009-03-02 Thread Rob Foxall
Dear R-Help, I have written a function, which in simplified format can be represented as: temp.fn <- function(my.mean,my.sd){ Parameters <- list(mean = my.mean, sd = my.sd) curve(do.call(dnorm,c(list(x), Parameters)), from = my.mean-my.sd, to = my.mean+my.sd) } This works as I want it do.