[Rcpp-devel] Problem with Rcpp and RcppArmadillo

2020-06-09 Thread Kiros Lo
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:

Re: [Rcpp-devel] Problem with Rcpp and RcppArmadillo

2020-06-09 Thread Dirk Eddelbuettel
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 RcppArma

Re: [Rcpp-devel] Problem with Rcpp and RcppArmadillo

2020-06-09 Thread Kiros Lo
Thanks, I'll take a look. On Tue, Jun 9, 2020 at 5:01 AM Dirk Eddelbuettel 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 >

Re: [Rcpp-devel] Problem with Rcpp and RcppArmadillo

2020-06-09 Thread Dirk Eddelbuettel
On 9 June 2020 at 05:02, Kiros Lo wrote: | Thanks, I'll take a look. Is the code in a repo I could access? It is probably something I can fix for you in two minutes which will be quicker than going back and forth by email. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

Re: [Rcpp-devel] Problem with Rcpp and RcppArmadillo

2020-06-09 Thread Dirk Eddelbuettel
On 9 June 2020 at 07:12, Dirk Eddelbuettel wrote: | | On 9 June 2020 at 05:02, Kiros Lo wrote: | | Thanks, I'll take a look. | | Is the code in a repo I could access? It is probably something I can fix for | you in two minutes which will be quicker than going back and forth by email. Also: the

Re: [Rcpp-devel] Zero length vectors in R

2020-06-09 Thread Toby Hocking
Hi Leonardo thanks for the help. For context, we are trying to fuzz test Rcpp packages, so we are throwing random sized vectors at Rcpp functions which have been written by others. We want to be able to detect when these Rcpp functions have memory read/write issues (e.g. reading the first element o

Re: [Rcpp-devel] Zero length vectors in R

2020-06-09 Thread Leonardo Silvestri
Hi Toby, OK, I see better now what you are trying to do. The discussion you mention is most likely relevant here - other people more versed than me in valgrind and R's memory allocation could probably attest to that. Another idea to detect these errors would be to create a modified Rcpp pac