Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit dependence on 'stats' and 'methods' #72

grayclhn opened this issue Jan 10, 2012 · 1 comment

Implicit dependence on 'stats' and 'methods' #72

grayclhn opened this issue Jan 10, 2012 · 1 comment


Copy link

roxygenize uses the 'setNames' function from stats and 'setPackageName' from methods, but stats and methods are not listed in the package dependencies. They are both loaded anyway when using R interactively, but not when Rscript is used, i.e.:

$ Rscript --default-packages=roxygen2 -e 'roxygenize("simplebreak.source", "simplebreak")'

gives the error:

Error in read.description(DESCRIPTION) :
could not find function "setNames"
Calls: roxygenize -> read.description
Execution halted


$ Rscript --default-packages=roxygen2,stats,methods -e 'roxygenize("simplebreak.source", "simplebreak")'

works fine. This is in R version 2.14.1 beta (r57866).

@hadley hadley closed this as completed in c26882b Jan 21, 2012
Copy link

giupo commented Jul 23, 2015

I still have the same issue reported by @grayclhn; I see that in the commit 1ab13d5 (if I'm not wrong or I've missed something...) the dependency on stats has been removed although the method stats::setNames is still used today

If I add stats dependency to my projects, everything goes right. Shouldn't roxygen2 declare a dependency on stats?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

3 participants