Avraham Adler
2018-12-10 16:24:03 UTC
There are no scalars in R; there are vectors of length 1.
https://stat.ethz.ch/pipermail/r-help/2003-April/032010.html
Avi
https://stat.ethz.ch/pipermail/r-help/2003-April/032010.html
Avi
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
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
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
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Sent from Gmail Mobile
Sent from Gmail Mobile