[Rcpp-devel] Rcpp can not return big DataFrame

该走了 gaizoule at gmail.com
Wed Mar 27 15:34:08 CET 2013


Hi Dirk,

Thank you for your prompt reply and suggestion. I tried a lot of times,
sometimes I got segfaults and sometimes I got an error messeger "Error:
error calling the data.frame function", sometimes I got the DataFrame
returned, but the elements is not correct.

2013/3/27 Dirk Eddelbuettel <edd at debian.org>

>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130327/933ba812/attachment.html>


More information about the Rcpp-devel mailing list