[Rcpp-devel] R::nbinom and R::nbinom_mu give identical results?

2014-10-29 Thread Helske Jouni
Dear list, I am trying to call R’s negative binomial function with Rcpp, but encountered some weird behaviour. Here is an example using inline: rcpp_Rf_dnbinom <- rcpp(signature(), ' return wrap(Rf_dnbinom( 4.0, 0.5, 0.9, 1)); ') rcpp_Rf_dnbinom_mu <- rcpp(signature(),

[Rcpp-devel] Initializing Armadillo vec/cube from NumericVector using as conversion

2016-09-22 Thread Helske, Jouni
Hi, I was recently hunting down a bug in my code, and stumbled upon a slightly incoherent behaviour in Rcpp/RcppArmadillo. In my real application I have a class which data members are initialized in initialization list from the Rcpp List using as. For example, I have a member y which I initiali

Re: [Rcpp-devel] Initializing Armadillo vec/cube from NumericVector using as conversion

2016-09-22 Thread Helske, Jouni
tries to avoid a copy) than for vec/mat when using as<>() (always? forces a copy). Jouni Lähettäjä: Dirk Eddelbuettel [e...@debian.org] Lähetetty: 22. syyskuuta 2016 23:09 Vastaanottaja: Dirk Eddelbuettel Kopio: Helske, Jouni; rcpp-devel@lists.

[Rcpp-devel] Call to function through pointer to incorrect function type on UBSAN

2017-07-07 Thread Helske, Jouni
I got some warnings on CRAN with UBSAN relating to my use of user supplied C++ function using Xptr: https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-UBSAN/bssm/build_vignettes.log I can't see anything wrong in my codes, although I have just tried to mimic some Dirk's Xptr examples without full

Re: [Rcpp-devel] Call to function through pointer to incorrect function type on UBSAN

2017-07-12 Thread Helske, Jouni
previous codes, which I hope might result warning free code by accident. ;) Best, Jouni Lähettäjä: Kevin Ushey [kevinus...@gmail.com] Lähetetty: 9. heinäkuuta 2017 2:33 Vastaanottaja: Helske, Jouni Kopio: rcpp-de...@r-forge.wu-wien.ac.at Aihe: Re: [Rcpp-devel] Call to

[Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export

2017-09-04 Thread Helske, Jouni
Hi, In the bssm package (https://github.com/helske/bssm), I let the users define a state space model via own C++ functions which are then exported as Xptr to R side, and passed back to C++ function for SMC/MCMC etc. Normally this works fine, but when user repeatedly modifies the model function

Re: [Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export

2017-09-04 Thread Helske, Jouni
d it takes seemingly random amount of iterations until Rstudio crashes. Jouni Lähettäjä: Simon Barthelmé Lähetetty: maanantai 4. syyskuuta 2017 13.14.52 Vastaanottaja: Helske, Jouni; Rcpp-devel@lists.r-forge.r-project.org Aihe: Re: [Rcpp-devel] Rstudio crashes wit

Re: [Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export

2017-09-05 Thread Helske, Jouni
t to trigger at certain point (third iteration of the outer loop). Jouni Lähettäjä: Dirk Eddelbuettel käyttäjän Dirk Eddelbuettel puolesta Lähetetty: maanantai 4. syyskuuta 2017 15.32.13 Vastaanottaja: Helske, Jouni Kopio: Rcpp-devel@lists.r-forge.r-project.org A

Re: [Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export

2017-09-05 Thread Helske, Jouni
Oops, forgot the link to the repo: https://github.com/helske/crashtest/issues/1 Best, Jouni Lähettäjä: Helske, Jouni Lähetetty: tiistai 5. syyskuuta 2017 12.31.15 Vastaanottaja: Dirk Eddelbuettel Kopio: Rcpp-devel@lists.r-forge.r-project.org Aihe: VS: [Rcpp

Re: [Rcpp-devel] Rstudio crashes with repeated calls to sourceCpp with Xptr export

2017-09-05 Thread Helske, Jouni
sing cleanupCacheDir = TRUE does not help, which I though would do essentially the same thing. Best, Jouni Lähettäjä: rcpp-devel-boun...@r-forge.wu-wien.ac.at käyttäjän Helske, Jouni puolesta Lähetetty: tiistai 5. syyskuuta 2017 12.32.05 Vastaanottaja: Dir