Hi,
On 27 March 2013 at 21:19, ??? wrote:
| Dear Rcpp developer,
| I am tried return a big DataFrame from Rcpp to R, but met some problem!
If you check the list archives you will see that has been discussed before.
| When n is big, like 4e5, then it will exhaust the memory or crash; when
n is
| small, like 4e3, it can return the correct DataFrame. I was wondering if
I agree.
But it probably "just" has to do with temp objects, which are co-managed by
R, so this is hard to sort out.
| Rcpp::DataFrame can handle so big DataFrame. In my opinion, n = 4e5 is
not big,
| I can create such a long data.frame from R code easily, without any
problem.
| Why Rcpp can not? Or I miss something?
You are welcome to debug it. Maybe valgrind will help.
Or if you don't want to or can't, just return a list of vectors and call
as.data.frame() on it when you back in R.
That's what we used to do anyway before we added the convenience wrapping.
Dirk
| ----------------------------------------------------------------------
| _______________________________________________
| 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
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com