[R] Package dependency

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Sep 21 16:59:07 CEST 2011

On 21.09.2011 06:20, Tyler Rinker wrote:
> Greetings R community,
> I am making my first package and have run into the need to use other packages.  I  pass all the checks in the command prompt running Rcmd check package.name.  In the Description file I have included:
> Depends: R (>= 2.13), plotrix
> Repository: CRAN
> Now I create the zip file for windows 7.  I delete my plotrix package from my library to create a setup where others might encounter when installing my package (perhaps they don't have the package dependency plotrix installed).  I now install the zip file in my R library and try to load it in R generating the following error:>

if you have declared stuff as above and CRAN is among the current 
repositories, install.packages() will install the dependencies for you.

Uwe Ligges

>> library(genTools)
> Loading required package: plotrix
> Error: package ‘plotrix’ could not be loaded
> In addition: Warning message:
> In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) :
>    there is no package called ‘plotrix’
> Now the question:  How do I get my package to automatically download dependencies from CRAN as other CRAN packages do when I install them to my library for the first time?
> Tyler Rinker
> R version 2.14 (beta)
> Windows 7       		 	   		
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list