4

Possible Duplicate:
How to properly use functions from other packages in a R package
load data set automatically

I've built an R package and am now testing it. It requires several packages like scatterplot3d, gdata, etc.

How can I get those packages to load automatically, when someone loads my package?

Thanks!

Edit Re Comments: I've already set imports in the Description and I've set the namespaces file. I know this works because the examples I put in work when I do R CMD Check. However, if I just load up R, type library(mypackage) it gives me an error.

Edit: Solved, I moved the packages I had in the imports section to the depends section. Thank you!

Community
  • 1
  • 1
user1357015
  • 11,168
  • 22
  • 66
  • 111
  • 1
    Read this: http://cran.r-project.org/doc/manuals/R-exts.html Check out the DESCRIPTION file and in particular the Depends field. – Dason Jun 11 '12 at 01:04
  • Read http://stackoverflow.com/a/10951283/602276 to see why it's a bad idea to use `depends` rather than `imports` – Andrie Jun 11 '12 at 03:40

0 Answers0