Hello,<div>In R, one can define a matrix and assign names to tows and columns:</div><div><br></div><div>A = matrix(1:9, nrow=3, ncol=3);</div><div>rownames(A) = c(&quot;R1&quot;, &quot;R2&quot;, &quot;R3&quot;)</div><div>colnames(A) = c(&quot;C1&quot;, &quot;C2&quot;, &quot;C3&quot;)</div>

<div><br></div><div>and then access entries in A by these row and column names instead of row and column numbers like:</div><div><br></div><div>A[&quot;R1&quot;, &quot;C1&quot;]</div><div><br></div><div>I tried to find out if this is possible in some way in Rcpp for Matrix type. I know that one can set rownames and colnames attributes for an object of type Matrix but my understanding is that this is done for preparing an object to be passed to R.</div>

<div><br></div><div>Is there a way to retrieve entries of a let say NumericMatrix by row and column names  ?</div><div><br></div><div>thanks,</div><div>Mahdi</div><div><br><br>
</div>