ions into something compatible with R’s C API is out of the question.</p>
</blockquote>
<p>Fortunately Rcpp provides two macros, <code>RCPP_RETURN_VECTOR</code> and <code>RCPP_RETURN_MATRIX</code> that make it very simple to implement a templated function.</p>
<div class="sourceCode" id="cb74"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb74-1"><a href="200_robject.html#cb74-1"></a><span class="kw">template</span>&lt;<span class="dt">int</span> RTYPE&gt;</span>
<span id="cb74-2"><a 