Re: [Rcpp-devel] Principal Component in Armadillo

2013-03-11 Thread Dirk Eddelbuettel
On 11 March 2013 at 22:42, João Daniel Nunes Duarte wrote: | Hello, | | I'm trying to calculate principal component using 'princomp' function from | RcppArmadillo. Here's the cpp code: | | #include | | RcppExport SEXP pca(SEXP mats) {  |   try { |     |     Rcpp::NumericMatrix matr(mats); |  

Re: [Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo

2013-03-11 Thread Dirk Eddelbuettel
Christian, Thanks again -- this is now committed as rev4278 in the Rcpp repo. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-proj

Re: [Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo

2013-03-11 Thread Dirk Eddelbuettel
On 12 March 2013 at 10:59, Conrad S wrote: | > #include | > which is not expressive enough. I think we should go for something like boost | > where we have to do | > #include | > but that would require a directory | > (inst)/include/RcppArmadillo/RcppArmadillo/extensions

Re: [Rcpp-devel] "undefined symbol" when `R CMD check'. using Rcpp

2013-03-11 Thread Dirk Eddelbuettel
Couple of comments: On 12 March 2013 at 09:13, 전희원 wrote: | Hi! All. | | I want to make R package with "http://code.google.com/p/uchardet/"; library. | | But I encountered error. | | Executable file with -lchardet works well but shared library didn't work with | dyn.load() with Rcpp. | | Can

[Rcpp-devel] Principal Component in Armadillo

2013-03-11 Thread João Daniel Nunes Duarte
Hello, I'm trying to calculate principal component using 'princomp' function from RcppArmadillo. Here's the cpp code: #include RcppExport SEXP pca(SEXP mats) { try { Rcpp::NumericMatrix matr(mats); int n = matr.nrow(), k = matr.ncol(); arma::mat mat(matr.begin(), n, k, false);

Re: [Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo

2013-03-11 Thread Conrad S
> #include > which is not expressive enough. I think we should go for something like boost > where we have to do > #include > but that would require a directory > (inst)/include/RcppArmadillo/RcppArmadillo/extensions/sample.h > > which reads silly. Hm. > Better suggestio

[Rcpp-devel] "undefined symbol" when `R CMD check'. using Rcpp

2013-03-11 Thread 전희원
Hi! All. I want to make R package with "http://code.google.com/p/uchardet/"; library. But I encountered error. Executable file with -lchardet works well but shared library didn't work with dyn.load() with Rcpp. Can any one give some tips? I temporally opened github repo for reproducible codes.

Re: [Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo

2013-03-11 Thread Dirk Eddelbuettel
On 11 March 2013 at 15:55, Dirk Eddelbuettel wrote: | | On 11 March 2013 at 13:39, Christian Gunning wrote: | | > I don't like add-ons/ all that much as it doesn't show (Rcpp)Armadillo. | | > How about any one of these: | | > | | > inst/include/RcppArmadilloXtra/sample.h | | > ins

Re: [Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo

2013-03-11 Thread Dirk Eddelbuettel
On 11 March 2013 at 13:39, Christian Gunning wrote: | Dirk (and list for reference), | | On Sun, Mar 10, 2013 at 6:16 PM, Dirk Eddelbuettel wrote: | > | > Christian, Jonathan, | > | > On 8 March 2013 at 20:42, Christian Gunning wrote: | > | With some helpful prodding from Jonathan, I sat down wi

Re: [Rcpp-devel] Sample function(s) for inclusion in RcppArmadillo

2013-03-11 Thread Christian Gunning
Dirk (and list for reference), On Sun, Mar 10, 2013 at 6:16 PM, Dirk Eddelbuettel wrote: > > Christian, Jonathan, > > On 8 March 2013 at 20:42, Christian Gunning wrote: > | With some helpful prodding from Jonathan, I sat down with the sample > | code today. I moved sample.h to add-ons as per our