One more: Turns out R 3.1.1 does not have the required define for the
Rf_[dpqr]nbinom_mu, so I had to "park" the definition.
Come Friday and R 3.1.2 we can re-enable this as R 3.1.2 appears to correct
this. From its NEWS file:
* A few recently added C entry points were missing the remappi
On 29 October 2014 at 14:48, Helske Jouni wrote:
| 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(
Hi Xiaohui,
There are several problems in the code I have found:
1. MatrixXd rooti = L.inverse()*Eigen::MatrixXd::Identity(k,k) is not
necessary. You are multiplying a matrix with an identity matrix, so it can
be simplified as
MatrixXd rooti = L.inverse();
2. k is an integer, so you need to use k
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(),
On 29 October 2014 at 16:08, 李晓辉 wrote:
| These days i rewrote the dmvnorm() function from the mvtnorm package with
| RcppEigen which is publised in http://gallery.rcpp.org/articles/dmvnorm_arma/.
| The code as follows:
|
| #include
| using namespace Rcpp;
| // [[Rcpp::depends(RcppE
These days i rewrote the dmvnorm() function from the mvtnorm package with
RcppEigen which is publised in
http://gallery.rcpp.org/articles/dmvnorm_arma/.
The code as follows:
> #include
> using namespace Rcpp;
> // [[Rcpp::depends(RcppEigen)]]
> //[[Rcpp::export]]
> using Eigen::Map;
> using Eige