<div dir="ltr">Hello dear list members,<div><br></div><div>Following previous correspondence, I wish to use an Rcpp function inside a package I'm authoring.</div><div>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).</div>

<div>Looking at this Vignettes:</div><div><a href="http://cran.rstudio.com/web/packages/Rcpp/vignettes/Rcpp-package.pdf">http://cran.rstudio.com/web/packages/Rcpp/vignettes/Rcpp-package.pdf</a><br></div><div>I see that including Rcpp in a package require the use of "depends" in DESCRIPTION.</div>

<div>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?</div><div>(alternatively, I could have a separate package only for that function, but that feels a bit like a "hack" to me)</div>

<div><br></div><div>Thoughts?</div><div><br></div><div>With regards,</div><div>Tal</div><div><br></div><div><br></div><div><br></div><div><br clear="all"><div><div dir="ltr"><br>----------------Contact Details:-------------------------------------------------------<br>

Contact me: <a href="mailto:Tal.Galili@gmail.com" target="_blank">Tal.Galili@gmail.com</a> |  <br>Read me: <a href="http://www.talgalili.com" target="_blank">www.talgalili.com</a> (Hebrew) | <a href="http://www.biostatistics.co.il" target="_blank">www.biostatistics.co.il</a> (Hebrew) | <a href="http://www.r-statistics.com" target="_blank">www.r-statistics.com</a> (English)<br>

----------------------------------------------------------------------------------------------<br><br></div></div>
</div></div>