[Rcpp-devel] Fwd: Building and Installing an R package built under RcppArmadillo on Mac OS X
MISRA, SANJOG
sanjog.misra at simon.rochester.edu
Fri Oct 14 21:27:44 CEST 2011
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-bounces at r-forge.wu-wien.ac.at [mailto:rcpp-devel-bounces at r-forge.wu-wien.ac.at] On Behalf Of Steve Lianoglou
Sent: Friday, October 14, 2011 2:42 PM
To: Dirk Eddelbuettel
Cc: rcpp-devel at 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 <edd at 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 at 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 at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
More information about the Rcpp-devel
mailing list