[Rcpp-devel] Problem with Rcpp and RcppArmadillo

Kiros Lo darkjone0143 at gmail.com
Tue Jun 9 14:02:44 CEST 2020


Thanks, I'll take a look.

On Tue, Jun 9, 2020 at 5:01 AM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 9 June 2020 at 04:33, Kiros Lo wrote:
> | Hi there,
> |       I am trying to use RcppArmadillo to rewrite a weighted linear
> | regression function. But when I try to use devtools::document() to
> compile
>
> Wrong mailing list?  We don't mention devtools::document() so can't help.
>
> You could try RcppArmadillo.package.skeleton() instead (but be aware of an
> issue between R 4.0.0 and Rcpp which is fixed in Rcpp 1.0.4.12 which you
> can
> install from the Rcpp drat).
>
> | the code, an error has occurred:
> |
> |
> ----------------------------------------------------------------------------------------------------------------
> | ** byte-compile and prepare package for lazy loading
> | Error: object 'RcppArmadillo' is not exported by 'namespace:Rcpp'
>
> You may have gotten carried away with roxygen2 which is another tool our
> documentation hardly or not at all talks about.
>
> Dirk
>
> | Execution halted
> | ERROR: lazy loading failed for package 'fast'
> |
> ----------------------------------------------------------------------------------------------------------------
> |
> |
> | This is the head of my function
> |
> ----------------------------------------------------------------------------------------------------------------
> | #include <RcppArmadillo.h>
> | // [[Rcpp::depends(RcppArmadillo)]]
> |
> | //' estimate the regression estimates based on given the number of
> | repetitions
> | //'
> | //' @param x a Matrix
> | //' @export
> | // [[Rcpp::export]]
> | Rcpp::List fastLmX_impl(const arma::mat& X) {
> |   ... something like this
> | }
> |
> ----------------------------------------------------------------------------------------------------------------
> |
> |
> | And I have already include Rcpp and RcppArmadillo in my DESCRIPTION file
> :
> |
> ----------------------------------------------------------------------------------------------------------------
> | LinkingTo:
> |     Rcpp,
> |     RcppArmadillo
> | Imports:
> |     Rcpp (>= 0.11.0)
> |
> ----------------------------------------------------------------------------------------------------------------
> |
> |
> | Any help will be appreciated!
> |
> | Yours faithfully,
> | Wing Lo
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel at lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200609/82f0facb/attachment.html>


More information about the Rcpp-devel mailing list