Two questions:

1.  The main difference when using RcppArmadillo and Rcpp is the
header declaration and the return type for the function right?
extern "C" SEXP fastLm(SEXP ys, SEXP Xs) {}
RcppArmadillo takes this extern stuff whereas Rcpp takes RcppExport?
RcppExport SEXP newRcppVectorExample(SEXP vector) {}

2.  From the example, if I update the elements of X or Xr, then both
are updated correct?  Because they are pointing to the same thing.
Just want to make sure.  I'm dealing with both since Xr is used to
deal with some R objects, and X is used to do matrix multiplication,
etc.
arma::mat X(Xr.begin(), n, k, false);       // reuses memory and
avoids extra copy
arma::colvec y(yr.begin(), yr.size(), false);

Thanks.
Vinh
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to