Re: [R] R CMD methods and ggplot2 advice

2015-05-28 Thread Thierry Onkelinx
Dear Rolf, utils::globalVariables() seems to work package wide. I prefer to ignore these variable only within the function in which I explicitly define them. If I use one of those variables in another function in which I haven't declared them as global, then I want R CMD check to give me a NOTE.

Re: [R] R CMD methods and ggplot2 advice

2015-05-28 Thread Rolf Turner
On 27/05/15 23:37, Thierry Onkelinx wrote: Dear Glenn, Suppose this function test <- function(df){ ggplot(df, aes(x = gp, y = y)) + geom_point() } Then R CMD check will consider gp and y as global variables since they are undefined. Because R CMD check cannot detect that gp and y will be ex

Re: [R] R CMD methods and ggplot2 advice

2015-05-27 Thread Thierry Onkelinx
Dear Glenn, Suppose this function test <- function(df){ ggplot(df, aes(x = gp, y = y)) + geom_point() } Then R CMD check will consider gp and y as global variables since they are undefined. Because R CMD check cannot detect that gp and y will be extracted from df by ggplot2. Possible workarou

Re: [R] R CMD methods and ggplot2 advice

2015-05-26 Thread Duncan Murdoch
This posting should probably go to the new R-package-devel mailing list instead of R-help. If you do re-post there, you should give more information to let people help you. We can see the errors, but we can't see the source to your package, so it's hard to diagnose them. If your source is online