On 2/16/11 12:18 PM, "Douglas Bates" <ba...@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.willi...@thomsonreuters.com
http://labs.thomsonreuters.com


_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to