[Rd] Depending on many packages: another best practice question

hadley wickham h.wickham at gmail.com
Mon Feb 26 17:29:51 CET 2007


> You can use
>
> if(require(myPackage)) { ... }

Yes, but the problem with this is that I now have the fact that this
function requires that package stated in two places - in the body of
the function, and in the examples - adding redundancy which makes
maintenance harder.

I guess what I really want, is some way to throw an error that R CMD
check won't complain about - ie. a special dependency not met error.

Hadley



More information about the R-devel mailing list