[Rd] library() in .Rd Examples (Depends vs. Imports)?

Jonathan Greenberg jgrn at illinois.edu
Thu Oct 8 19:51:25 CEST 2015


I'm a little confused when documenting my code using Imports vs. Depends.
If I have an example in my .Rd that uses a library that is listed under
Imports, it doesn't work, but if it is listed under Depends, it does.  What
is the proper way to go about using examples that rely on an Imports?
Should I just if(require(somepackage)) in the example?  Or is there a more
elegant way of doing this?

--j

	[[alternative HTML version deleted]]



More information about the R-devel mailing list