Hi all,<div><br></div><div>I&#39;ve copied the following from a portion of the &quot;Using matrices&quot; section of the <a href="http://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-quickref.pdf">Rcpp Quick Reference guide</a>.  I get a compilation error that I&#39;m having trouble decoding.  Commenting out the third line allows it to compile, so it must be something I&#39;ve done wrong with the column selector, but I don&#39;t see it.  </div>

<div><br></div><div>Thanks in advance,</div><div>Chris</div><div><br></div><div>PS. My g++ version is 4.5.2, in case that helps.</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>

<div>src &lt;- &#39;</div><div>NumericMatrix xx(4, 5);</div><div>std::fill(xx.begin(), xx.end(), 8);</div><div>NumericMatrix::Column zzcol = xx( _, 1);</div><div>return(wrap(1));</div><div> &#39;</div><div>fun &lt;-  cxxfunction(signature(x=&quot;numeric&quot;), body = src, plugin=&quot;Rcpp&quot;)</div>

</div><div><br></div><div><div>file3011595e.cpp:35:39: error: invalid conversion from ‘SEXPREC*’ to ‘int’</div><div>file3011595e.cpp:35:39: error:   initializing argument 1 of ‘Rcpp::Matrix&lt;RTYPE&gt;::Proxy Rcpp::Matrix&lt;RTYPE&gt;::operator()(int, int) [with int RTYPE = 14, Rcpp::Matrix&lt;RTYPE&gt;::Proxy = double&amp;]’</div>

<div>file3011595e.cpp:35:39: error: conversion from ‘Rcpp::traits::storage_type&lt;14&gt;::type’ to non-scalar type ‘Rcpp::Matrix&lt;14&gt;::Column’ requested</div><div>make: *** [file3011595e.o] Error 1</div></div><div>
<br>
</div><div><br></div>