[Rcpp-devel] Building/linking trouble with cxxfunction()

Ken.Williams at thomsonreuters.com Ken.Williams at thomsonreuters.com
Wed Feb 16 21:03:25 CET 2011

On 2/16/11 12:18 PM, "Douglas Bates" <bates at stat.wisc.edu> wrote:

>The dgCMatrix object is of an S4 class.  It's best to use the S4 class
>from Rcpp so you can extract the slots as Rcpp::IntegerVector and
>Rcpp::NumericVector objects.  Once you get them in that form the
>pointers are best obtained through the begin() method.

Thanks Doug.

I feel silly asking this, but could you please point me to the docs for
the S4 class? I assume that's the Rcpp::S4 class?  I've seen it mentioned
various places (e.g. the Rcpp-introduction vignette) but I can't seem to
find a list of its methods & API.  begin() is a method I'd never heard of,
I assume it returns a pointer to the first element of the vector?

Ken Williams
Senior Research Scientist
Thomson Reuters
Phone: 651-848-7712
ken.williams at thomsonreuters.com

More information about the Rcpp-devel mailing list