[Rcpp-devel] Using Rcpp in a package only as an option?
Tal Galili
tal.galili at gmail.com
Fri Aug 16 18:36:51 CEST 2013
Hello dear list members,
Following previous correspondence, I wish to use an Rcpp function inside a
package I'm authoring.
However, I do not wish to force the user to install Rcpp, and if he does
not wish to do so, I want to let him "fall back" on an R written function
(which is 20-40 times slower, but it works).
Looking at this Vignettes:
http://cran.rstudio.com/web/packages/Rcpp/vignettes/Rcpp-package.pdf
I see that including Rcpp in a package require the use of "depends" in
DESCRIPTION.
Is there a way to have Rcpp as "Suggests", and to later use "require" when
loading the package, to decide if to load the Rcpp function or the R
function?
(alternatively, I could have a separate package only for that function, but
that feels a bit like a "hack" to me)
Thoughts?
With regards,
Tal
----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili at gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130816/51a3c001/attachment.html>
More information about the Rcpp-devel
mailing list