<div dir="ltr">All right!  I think I have it figured out, at least for the toy functions/package.  <br><div><br>What wasn't compiling wasn't my functions, it was RcppExports.cpp.  sourceCpp (and hence also the knit example) have been working for me all along.  The only issue (apparently) was that RcppExports.cpp was not including the bigmemory headers.  It complained about not knowing the type "BigMatrix" for example.  However since RcppExports.cpp is automatically generated, I didn't know how to force it to include more headers.  <br>
<br>It dawned on me that somewhere in the Rcpp-attributes vignette creating custom headers came up, sure enough using // [[Rcpp::interfaces(r, cpp)]] and following along in that section 3.5 discussion and then rebuilding did the trick.  In the end I just I added the required bigmemory header "MatrixAccessor.hpp" to the generated "package.h" file, which is then automatically included into the RcppExports.cpp file.<br>
<br>Thanks again, and thanks everybody for developing and providing support for this incredible software.<br>Alex<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 4:33 PM, 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>
<br>
On 11 April 2013 at 16:14, Alex Ustian wrote:<br>
| Sorry to be dense, but you mean to copy and paste the source into an Rmd file<br>
| and knit it?  If yes, then I did just that and it did work.<br>
<br>
</div>Good.<br>
<br>
Now try to find the differences to your code, which as I understand your<br>
post, does not compile.  As you just demonstrated that your compiler, R, Rcpp,<br>
bigmemory, ... setup is fine.<br>
<div class="HOEnZb"><div class="h5"><br>
Dirk<br>
<br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</div></div></blockquote></div><br></div>