[Rcpp-devel] DataFrame::create() in endless loop
Hi, thanks everyone for the help, I used IntegerVector and friends, and changed from DataFrame to List. Thanks, Steffen
On Tue, 2012-02-28 at 14:59 -0500, Slava Mazur wrote:
It's a memory problem from R. It is trying to do garbage collection
(RunGenCollector) and getting hung up, probably because of
exhausting
one of the stacks in R. Your std::vector<int> objects need to be
copied to R objects. Is it possible to define them as
IntegerVector's
instead, in which case the Create method will (I think) just move
some
pointers around.
I had the same problem a while ago and the solution we?ve come up with was to get rid of Rcpp::DataFrame and use Rcpp::XPtr instead. It turned out that Rcpp::DataFrame is rather impractical for sufficiently large data sets. As an alternative, Rcpp::XPtr is a little bit more complex to implement but by far more reliable and efficient. For more details see this http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-January/003335.html and subsequent messages. Hope this helps. Cheers, Slava Mazur
_______________________________________________ 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
IPB Halle AG Massenspektrometrie & Bioinformatik Dr. Steffen Neumann http://www.IPB-Halle.DE Weinberg 3 http://msbi.bic-gh.de 06120 Halle Tel. +49 (0) 345 5582 - 1470 +49 (0) 345 5582 - 0 sneumann(at)IPB-Halle.DE Fax. +49 (0) 345 5582 - 1409