Hi ,<div><br></div><div>I am trying a simple example to assign entire rows to a Rcpp::NumericMatrix. I read the Rcpp sugar document and looked at a few online</div><div>examples. My simple code below produces errors:</div>
<div><br></div><div><br></div><div> #include <iostream></div><div> #include <Rcpp.h></div><div><br></div><div>using std::cout;</div><div>using  std:endl;</div><div><br></div><div>// [[Rcpp::export]</div><div><br>
</div><div>void test()</div><div>{</div><div> </div><div>     Rcpp::NumericMatrux mat(100,100);</div><div>     int rows = mat.nrow();</div><div>     int cols  = mat.ncol();</div><div>     cout << "rows " << rows << endl;</div>
<div>     cout << "cols " << cols << endl;</div><div>      Rcpp::NumericVector row2 = mat(1,_);</div><div>     cout << "mat(1,_) " << row2 << endl;</div><div><br></div>
<div><br></div><div><br></div><div>}</div><div><br></div><div><br></div><div>Error:   error: '_' was not declared in this scope</div><div><br></div><div>Thank you</div><div>Bharath</div>