Quantcast
Channel: C array to Rcpp NumericVector - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by bgoldst for C array to Rcpp NumericVector

I know of two ways this can be done:1: range constructorcppFunction(' NumericVector fun() { double data[5] = {1.0,2.0,1.0,2.0,1.0}; return NumericVector(data,data+sizeof(data)/sizeof(*data));...

View Article



C array to Rcpp NumericVector

I am working with C arrays, and I need to convert them to Rcpp::NumericVector at some point in my code. I tried the following code but it throws an error (cannot convert from double [5] to type...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images