[Rcpp-devel] extend to cover exporting non-reference S4 objects?
Greg Minshall
minshall at umich.edu
Fri Mar 8 06:29:21 CET 2013
Dirk,
thanks for the reply. i'll think about Nice Additions as i become more
familiar with the magic of Rcpp. i would guess, since reference classes
can make it, so can pass-by-value S4 objects.
> In general, though, it helps to remember that we have to play the hand
> we've been dealt. This is R, and we have precisely _one_ interface
> via .Call:
> SEXP someFunc(SEXP a, SEXP b, SEXP c, ....)
> and there are limits as to what a SEXP can be.
by hand, i can pass and return S4 objects. i.e., they seem to fit in
the SEXP structure (**). so, i'd guess that (with a possibly unbounded
amount of coding ;-) software could do the same.
cheers, Greg
** would it be helpful to people if i posted an example? actually, my
"test5.cc" i just posted gives the basic template, other than the case
of *passing* a list of some S4 object class.
More information about the Rcpp-devel
mailing list