[Rd] Best way to implement optional functions?

Duncan Murdoch murdoch.duncan at gmail.com
Thu Oct 22 21:55:01 CEST 2015


I'm planning on adding some new WebGL functionality to the rgl package, 
but it will pull in a very large number of dependencies. Since many 
people won't need it, I'd like to make the new parts optional.

The general idea I'm thinking of is to put the new stuff into a separate 
package, and have rgl "Suggest" it.  But I'm not sure whether these 
functions  should only be available in the new package (so users would 
have to attach it to use them), or whether they should be in rgl, but 
fail if the new package is not available for loading.

Can people suggest other packages that solve this kind of problem in a 
good way?

Duncan Murdoch



More information about the R-devel mailing list