Re: [Rcpp-devel] Running RcppArmadillo on Mac OS X 10.7

2012-06-13 Thread MISRA, SANJOG
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

Re: [Rcpp-devel] Fwd: Building and Installing an R package built under RcppArmadillo on Mac OS X

2011-10-14 Thread MISRA, SANJOG
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

Re: [Rcpp-devel] variable affectation in Rcpp Rcpp Armadillo

2011-06-15 Thread MISRA, SANJOG
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

Re: [Rcpp-devel] as cube

2011-06-06 Thread MISRA, SANJOG
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)); }