[Rcpp-devel] Fwd: Building and Installing an R package built under RcppArmadillo on Mac OS X
Dirk Eddelbuettel
edd at debian.org
Fri Oct 14 19:17:57 CEST 2011
To bring closure to this issue I may well have misdiagnosed at first, could
someone on an OS X machine please run the following
-----------------------------------------------------------------------------
suppressMessages(library(inline))
fun <- cxxfunction(signature(M_="numeric"), plugin="RcppArmadillo",
body='
arma::mat M = Rcpp::as<arma::mat>(M_);
return Rcpp::wrap( symmatl(M) );
')
set.seed(42)
fun(matrix(rnorm(9),3,3))
-----------------------------------------------------------------------------
My linux box gets me
R> suppressMessages(library(inline))
R> fun <- cxxfunction(signature(M_="numeric"), plugin="RcppArmadillo",
+ body='
+ arma::mat M = Rcpp::as<arma::mat>(M_);
+ return Rcpp::wrap( symmatl(M) );
+ ')
R> set.seed(42)
R> fun(matrix(rnorm(9),3,3))
[,1] [,2] [,3]
[1,] 1.370958 -0.564698 0.363128
[2,] -0.564698 0.404268 -0.106125
[3,] 0.363128 -0.106125 2.018424
R>
and I would like to rule out actual OS X issue and with that pass the baton
back to Terrance as a presumably local issue on his box.
Thanks!
Dirk
--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
More information about the Rcpp-devel
mailing list