[Rcpp-devel] Create scalar values in Rcpp

Wolf Vollprecht w.vollprecht at gmail.com
Mon Dec 10 17:13:43 CET 2018


Hi,

What's the canonical way of creating a scalar SEXP in Rcpp? E.g. I would
like to store a single numeric / integer / complex ... value. I can create
an array with 1 element, but I couldn't find a way to do it for a scalar
(and I figured out later that a scalar is *not* the same as a 1element
array even though they print the same).

Any pointers?

Thanks,

Wolf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20181210/47e05f37/attachment-0001.html>


More information about the Rcpp-devel mailing list