<div dir="ltr">Thanks, I'll take a look. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 9, 2020 at 5:01 AM Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On 9 June 2020 at 04:33, Kiros Lo wrote:<br>
| Hi there,<br>
|       I am trying to use RcppArmadillo to rewrite a weighted linear<br>
| regression function. But when I try to use devtools::document() to compile<br>
<br>
Wrong mailing list?  We don't mention devtools::document() so can't help.<br>
<br>
You could try RcppArmadillo.package.skeleton() instead (but be aware of an<br>
issue between R 4.0.0 and Rcpp which is fixed in Rcpp 1.0.4.12 which you can<br>
install from the Rcpp drat).<br>
<br>
| the code, an error has occurred:<br>
| <br>
| ----------------------------------------------------------------------------------------------------------------<br>
| ** byte-compile and prepare package for lazy loading<br>
| Error: object 'RcppArmadillo' is not exported by 'namespace:Rcpp'<br>
<br>
You may have gotten carried away with roxygen2 which is another tool our<br>
documentation hardly or not at all talks about.<br>
<br>
Dirk<br>
<br>
| Execution halted<br>
| ERROR: lazy loading failed for package 'fast'<br>
| ----------------------------------------------------------------------------------------------------------------<br>
| <br>
| <br>
| This is the head of my function<br>
| ----------------------------------------------------------------------------------------------------------------<br>
| #include <RcppArmadillo.h><br>
| // [[Rcpp::depends(RcppArmadillo)]]<br>
| <br>
| //' estimate the regression estimates based on given the number of<br>
| 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>
| }<br>
| ----------------------------------------------------------------------------------------------------------------<br>
| <br>
| <br>
| And I have already include Rcpp and RcppArmadillo in my DESCRIPTION file :<br>
| ----------------------------------------------------------------------------------------------------------------<br>
| LinkingTo:<br>
|     Rcpp,<br>
|     RcppArmadillo<br>
| Imports:<br>
|     Rcpp (>= 0.11.0)<br>
| ----------------------------------------------------------------------------------------------------------------<br>
| <br>
| <br>
| Any help will be appreciated!<br>
| <br>
| Yours faithfully,<br>
| Wing Lo<br>
| _______________________________________________<br>
| Rcpp-devel mailing list<br>
| <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
| <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
-- <br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a><br>
</blockquote></div>