On 12 March 2013 at 14:10, João Daniel Nunes Duarte wrote:
| Thanks for your explanation, Dirk! Indeed, I looked at Armadillo
documentation,
| but it was not clear what was the kind of return.
|
| Regarding the linking error, I had created the package using
| Rcpp.package.skeleton (because I did
Thanks for your explanation, Dirk! Indeed, I looked at Armadillo
documentation, but it was not clear what was the kind of return.
Regarding the linking error, I had created the package using
Rcpp.package.skeleton (because I didn't know I was going to use
RcppArmadillo), and then I made the necessa
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);
|
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);