Re: [Rcpp-devel] Filling a big.matrix in Rcpp

2013-03-14 Thread Michael Kane
OK, I've got it working. You need to add the bigmemory inst directory to the PKG_CPPFLAGS, include MatrixAccessor.hpp, and pass the pointer to the BigMatrix object to your function. The following code should do the trick but note that it does not create a new big.matrix object it simply modifies t

Re: [Rcpp-devel] Filling a big.matrix in Rcpp

2013-03-14 Thread Michael Kane
Shradda, A big.matrix is not a regular R matrix. It is a completely separate type. The definition can be found in BigMatrix.h. I've rewritten your C++ code but there is still a problem. To build the function the compiler needs to know where the bigmemory header files are. Basically, you need to #i