<div dir="ltr">Hi there,<div>      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:</div><div><br></div><div><div>----------------------------------------------------------------------------------------------------------------</div><div></div></div><div>** byte-compile and prepare package for lazy loading<br>Error: object 'RcppArmadillo' is not exported by 'namespace:Rcpp'<br>Execution halted<br>ERROR: lazy loading failed for package 'fast'<br></div><div><div>----------------------------------------------------------------------------------------------------------------</div><div></div></div><div><br></div><div><br></div><div>This is the head of my function</div><div>----------------------------------------------------------------------------------------------------------------</div><div>#include <RcppArmadillo.h><br>// [[Rcpp::depends(RcppArmadillo)]]<br><br>//' estimate the regression estimates based on given the number of repetitions<br>//'<br>//' @param x a Matrix<br>//' @export<br>// [[Rcpp::export]]<br>Rcpp::List fastLmX_impl(const arma::mat& X) {<br>  ... something like this<br></div><div>}</div><div><div>----------------------------------------------------------------------------------------------------------------</div><div></div></div><div><br></div><div><br></div><div>And I have already include Rcpp and RcppArmadillo in my DESCRIPTION file :</div><div><div>----------------------------------------------------------------------------------------------------------------</div><div></div></div><div>LinkingTo: <br>    Rcpp,<br>    RcppArmadillo<br>Imports: <br>    Rcpp (>= 0.11.0)<br></div><div><div>----------------------------------------------------------------------------------------------------------------</div><div></div></div><div><br></div><div><br></div><div>Any help will be appreciated!</div><div><br></div><div>Yours faithfully,</div><div>Wing Lo</div></div>