<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 3, 2014 at 11:48 AM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 3 February 2014 at 10:23, French, Joshua wrote:<br>
| Soren and Doug,<br>
|<br>
| Thanks for the info about the sparse matrices.  I'll give it a go and seen what<br>
| happens.  If it works out, then perhaps I'll be able to provide a nice<br>
| RcppGallery example.<br>
<br>
</div>Yes -- there isn't much yet in RcppArmadillo but this is expected to<br>
grow. And CRAN now has rARPACK so we get cheaply to the object code too.<br>
<br>
One last comment I should have made earlier: "dense" data from R comes over<br>
cheaply as a SEXP; "sparse" will always require a copy.  Keep that in mind,<br>
and on the margin don't believe anything any of us say but keep profiling and<br>
measuring :)<br></blockquote><div></div></div><br></div><div class="gmail_extra">Not really.  RcppEigen offers conversion of SEXPs to Eigen::SparseMatrix and Eigen::MappedSparseMatrix types.  The second uses the storage from R without copying and hence should generally be declared with the const modifier.  I think that wonderful vignetter by Bates and Eddelbuettel describes this :-)</div>
</div>