Look at
http://r.research.att.com/tools/
RcppArmadillo installs and works perfectly fine for me.
Sanjog Misra
Associate Professor of Marketing and Applied Statistics
Area Coordinator, Applied Statistics
Simon School of Business
University of Rochester
Rochester, NY 14627
P: 585.275.8920
F: 585.2
As does mine.
> fun <- cxxfunction(signature(M_="numeric"), plugin="RcppArmadillo",body = '
+ arma::mat M = Rcpp::as(M_);
+ return Rcpp::wrap(symmatl(M));
+ ')
> set.seed(42)
> fun(matrix(rnorm(9),3,3))
[,1] [,2] [,3]
[1,] 1.3709584 -0.5646982 0.3631284
[2,] -0.5646982 0
I've also written MCMC code using arma and have no trouble overwriting
(assuming that's what reaffectation is) matrices.
On Jun 15, 2011, at 8:17 PM, "Nicolas Heslot" wrote:
Well,
That's sound good,
The distribution I need are multivariate normal, inverse gaussian.
Though, the biggest issu
Richard,
I usually use a list for this (see below). If anybody has a simpler way,
I would love to learn about it...
Sanjog
src.cube = '
Rcpp::List aL(aL_);
int nr = Rcpp::as(nr_);
int nc = Rcpp::as(nc_);
int ns = Rcpp::as(ns_);
arma::cube a(nr,nc,ns);
for(int i=0; i(aL(i));
}