On 9 September 2013 at 09:26, Simon Urbanek wrote: | On Sep 9, 2013, at 4:22 AM, Simon Zehnder wrote: | > I am writing right now my own package that makes use of 'tempfile' and | > there within with 'path.package'. When I install it, I get the error: Error | > in path.package("mypackage") : none of the packages are loaded. Here is the | > code, I use in my package: [...] | That path to your package is dynamic - in general it will not be know when | creating the lazy-load DB, so you really want to put that code in .onLoad() | where the path is known.
And you may want to use system.file() rather than path.package(), at least if I understand the question right. Here is what I use to share the bibtex file for the Rcpp vignettes with other Rcpp* package vignettes: R> system.file(package="Rcpp", "doc", "Rcpp.bib") [1] "/usr/local/lib/R/site-library/Rcpp/doc/Rcpp.bib" R> Answer conditional on my particular Linux system, but the path is guaranteed to be valid as long as Rcpp is installed which one can ensure via Depends: from another package. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel