Same here, fun(matrix(rnorm(9),3,3)) [,1] [,2] [,3] [1,] 1.3709584 -0.5646982 0.3631284 [2,] -0.5646982 0.4042683 -0.1061245 [3,] 0.3631284 -0.1061245 2.0184237 > sessionInfo() R version 2.13.1 (2011-07-08) Platform: i386-apple-darwin9.8.0/i386 (32-bit)
locale: [1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets grid methods base other attached packages: [1] RcppArmadillo_0.2.29 Rcpp_0.9.6 inline_0.3.8 [4] ggplot2_0.8.9 proto_0.3-9.2 reshape_0.8.4 [7] plyr_1.6 loaded via a namespace (and not attached): [1] tools_2.13.1 > system("g++ --version") i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577) baptiste On 15 October 2011 08:27, MISRA, SANJOG <sanjog.mi...@simon.rochester.edu> wrote: > As does mine. > >> 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)) > [,1] [,2] [,3] > [1,] 1.3709584 -0.5646982 0.3631284 > [2,] -0.5646982 0.4042683 -0.1061245 > [3,] 0.3631284 -0.1061245 2.0184237 > > > > :>g++ --version > i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) > >> sessionInfo() > R version 2.13.0 (2011-04-13) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > > > 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.273.1140 > > > -----Original Message----- > From: rcpp-devel-boun...@r-forge.wu-wien.ac.at > [mailto:rcpp-devel-boun...@r-forge.wu-wien.ac.at] On Behalf Of Steve Lianoglou > Sent: Friday, October 14, 2011 2:42 PM > To: Dirk Eddelbuettel > Cc: rcpp-de...@r-forge.wu-wien.ac.at > Subject: Re: [Rcpp-devel] Fwd: Building and Installing an R package built > under RcppArmadillo on Mac OS X > > Something is definitely wrong. > > My printout goes out to 1 more decimal place than yours: > > R> fun(matrix(rnorm(9),3,3)) > [,1] [,2] [,3] > [1,] 1.3709584 -0.5646982 0.3631284 > [2,] -0.5646982 0.4042683 -0.1061245 > [3,] 0.3631284 -0.1061245 2.0184237 > > R> sesionInfo() > R version 2.13.1 Patched (2011-09-15 r57010) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > ... > > And > > $ g++ --version > i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664) > > -steve > > On Fri, Oct 14, 2011 at 1:17 PM, Dirk Eddelbuettel <e...@debian.org> wrote: >> >> 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 >> _______________________________________________ >> Rcpp-devel mailing list >> Rcpp-devel@lists.r-forge.r-project.org >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >> > > > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact > _______________________________________________ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > _______________________________________________ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel