Hello,
On a more cosmetic level, you could use the pow function from sugar:
require( Rcpp )
require( inline )
fx<- cxxfunction(
signature(),
plugin="Rcpp",
body="
Rcpp::NumericMatrix out_xx(10, 4);
for(int i=0; i<4; i++)
out_xx(_,i) = pow( seq(0, 9), i ) ;
Hi,
On Sat, Sep 3, 2011 at 12:54 AM, Noah Silverman wrote:
> Hi,
>
> Just starting to learn about Rcpp tonight (Using it through the inline
> library)
>
> I'm attempting to construct a matrix and then fill it with values as I
> iterate through my function. The results are wrong. Am I accessin
Hi,
Just starting to learn about Rcpp tonight (Using it through the inline library)
I'm attempting to construct a matrix and then fill it with values as I iterate
through my function. The results are wrong. Am I accessing the cells of the
matrix incorrectly?
The idea was to have an integer i