[Rcpp-devel] Use of "Depends: Rcpp" in packages using Rcpp

Tue Jan 7 02:45:39 CET 2014


I¹m not sure if this question is in reference to an email from Brian
Ripley, but I was under the impression that we should include Rcpp and/or
RcppArmadillo in Depends so that it is not installed for binary versions
of the packages.  The following excerpt is from an email recently sent out
by Professor Ripley:

³As far as I can see, these packages [packages that link to BH,
RcppArmadillo and/or RcppEigen] are using only the headers provided by BH,
RcppArmadillo and/or RcppEigen.

As the latter are quite large packages, it is desirable that they are not
installed for binary (OS X/Windows) installs, which will happen if they
are listed only in the LinkingTo field.

Some people have them in other fields to impose a version requirement:
this is supported in LinkingTo as from R 3.0.2.  So use something like

Depends R (>= 3.0.2), Rcpp
LinkingTo: Rcpp, RcppArmadillo (>= 0.2.34)

Joshua French, Ph.D.
Assistant Professor
Department of Mathematical and Statistical Sciences
University of Colorado Denver
Joshua.French at ucdenver.edu
Ph:  303-315-1709  Fax:  303-315-1701

On 1/6/14, 5:58 PM, "Dirk Eddelbuettel" <edd at debian.org> wrote:

>On 6 January 2014 at 16:30, Davor Cubranic wrote:
>| The Rcpp-package vignette says to use "Depends: Rcpp" in the
>DESCRIPTION of packages that use Rcpp to indicate the dependency and
>"LinkingTo: Rcpp" to indicate the use of headers. Is "Depends" really
>necessary? If the dependent package needs to use R code, it can be done
>with "Imports" without the side-effect of attaching Rcpp's namespace. And
>since R 3.0.2, the version dependency information can be expressed in
>Sure.  "Do as I do, not do as I say".
>RcppArmadillo, for example, uses this:
>  Depends: R (>= 2.14.0)
>  LinkingTo: Rcpp
>  Imports: Rcpp
>No Depends, but LinkingTo and Import.
>Documentation patches welcome, as always.
>Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>Rcpp-devel mailing list
>Rcpp-devel at lists.r-forge.r-project.org

More information about the Rcpp-devel mailing list