Include a non-CRAN package in a CRAN package.

The question is pretty simple. At first:

  • Is it possible to include a CRAN package (or bioconductor or omega hat) in a CRAN package and actually use the tools from this package in the examples.
  • If so, how to configure the DESCRIPTION file, etc., to make it legal and pass the CRAN check?

In particular, I ask about openNLPmodels.en , which used to be a CRAN package. This is very useful and wants to include functionality in it. I could work and not use openNLPmodels.en in the examples or create unit tests for it and install it when using the function (just like the floor package installs the data sets it needs), but I would prefer an approach that allows me to run checks, texts, examples.

So openNLPmodels.en is downloaded and installed

 install.packages( "http://datacube.wu.ac.at/src/contrib/openNLPmodels.en_1.5-1.tar.gz", repos=NULL, type="source" ) 
+12
r package cran
source share
1 answer

It is possible, but! ...

There is a field in the DESCRIPTION file that you can use:

 Additional_repositories: http://ghrr.imtqy.com/drat 

BUT!

Everything that depends on the functionality of the package from the additional storage should be absolutely optional.

Therefore, packages from this repo should be placed in the " Suggests .

example

I am not 100% sure whether BioConductor and OmegaHat are basic or not.

0
source share

All Articles