[R] Writing R package and do.call
hadley wickham
h.wickham at gmail.com
Tue Mar 3 03:50:22 CET 2009
On Mon, Mar 2, 2009 at 7:46 PM, Rob Foxall <rfoxall27 at gmail.com> 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,
> to = my.mean+my.sd)
> }
>
> This works as I want it do. Wishing to immortalise this function into
> my very own package however, results in the following warning:
> (Running R CMD check myPackage)
>
> * checking R code for possible problems ... NOTE
> temp.fn: no visible binding for global variable 'x'
This isn't a warning - it's just a note! You don't need to do
anything about it if you don't want to.
Hadley
--
http://had.co.nz/
More information about the R-help
mailing list