[Rcpp-devel] returning array from C

Krzysztof Sakrejda krzysztof.sakrejda at gmail.com
Tue Jun 11 19:42:02 CEST 2013

On Jun 11, 2013 12:33 PM, "Steve Jaffe" <sjaffe at riskspan.com> wrote:
> The problem with External Pointer is that R will not be able to use it as
a numeric vector (sfaik).
> What I'm looking for -- and perhaps it is impossible -- would be a way to
combine the memory semantics of External Pointer with the value semantics
of Numeric Vector. Or something along those lines.

You can get what you want, but you'll have to use XPtr, then on the R side
write a reference class and methods which make the object behave like a
numeric vector.  No copying necessary.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130611/42c00aa6/attachment.html>

More information about the Rcpp-devel mailing list