[Rcpp-devel] Problem with Rcpp and RcppArmadillo

Kiros Lo darkjone0143 at gmail.com
Tue Jun 9 13:33:41 CEST 2020


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
the code, an error has occurred:

----------------------------------------------------------------------------------------------------------------
** byte-compile and prepare package for lazy loading
Error: object 'RcppArmadillo' is not exported by 'namespace:Rcpp'
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200609/eee4d16b/attachment.html>


More information about the Rcpp-devel mailing list