[Rcpp-devel] Passing large data frame

R_help Help rhelpacc at gmail.com
Mon Jun 14 05:38:24 CEST 2010


Hi,

I have a doubt regarding passing large data frame into Rcpp. If we
consider the following function

foo(SEXP myframe) {

    RcppFrame &fr_ref = (RcppFrame &) myframe;
}

Somehow seems to work without a need to call a constructor and thus
causes copy of large data frame to RcppFrame object. However, you can
see that the code is not safe. there's no guarantee that myframe is a
data frame. This is my first question, is there any way to check type
of the input SEXP? Or is there any better way to do this?

Secondly, I'm wondering why the POSIXct column in my data frame
appears as double when I pass a data frame as an argument into a
function or when I read it out from global environment map? Is there
anyway to ensure it appears as RcppDatetime? Thank you.

Robert


More information about the Rcpp-devel mailing list