[Rcpp-devel] Dispatching based on SEXPTYPE
Romain Francois
romain at r-enthusiasts.com
Thu Nov 22 15:43:53 CET 2012
Le 22/11/12 15:37, JJ Allaire a écrit :
> The constructor of Vector based in iterator takes care of the
> business. So you don't need to write a dispatch.
>
> I like the idea of DISPATCH_METHOD, we would need extras at least
> for RAWSXP, CPLXSXP and VECSXP .
>
>
> This turned out really nice!
>
> I have this as RcppScript now on my ~/bin:
>
>
> Should we consider adding this to the package in something like
> inst/utils or would it be enough to just document the possibility?
Does not cost us to have the macro in some file in the
inst/include/macros directory.
The name of the macro should in my view giev an idea that this is meant
for vectors, e.g. DISPATCH_VECTOR_METHOD or something
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy
blog: http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP with Rcpp modules
`- http://bit.ly/Thw7IK : Rcpp modules more flexible
More information about the Rcpp-devel
mailing list