Error message
Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home3/gardeoi3/public_html/iamrandom/includes/common.inc).
Rcpp
By tholscla on Sat, 11/02/2013 - 10:37
###### Libraries
library(Rcpp)
library(inline)
###### wrapper
fx <- cxxfunction(,"",includes=
'
**********FILL FUNCTIONS IN HERE************
RCPP_MODULE(foo)
{ function( "functionname1", &functionname1 ) ;
function( "functionname2", &functionname2 ) ;
}
', plugin="Rcpp")
foo <- Module("foo",getDynLib(fx))
By tholscla on Sat, 11/02/2013 - 00:22
Multiply two vectors together using a dot product.
double dot(Rcpp::NumericVector c,Rcpp::NumericVector d)
{ int nc= c.size();
double e=0;
for (int i = 0; i < nc; i++)
{ e=e+c(i)*d(i); }
return e;
}
By tholscla on Sat, 11/02/2013 - 00:16
Seemlessly pass three dimensional arrays between between R and Rcpp. I found a function called threeDIndex on a forum written for Rcpp but it did not convert from R to Rcpp smoothly. I needed to be passing these 3D arrays back and forth not just using them in Rcpp. I re-wrote the threeDIndex code (mythreeDIndex code) that works seemlessly with the R coverterts c() and array().
By tholscla on Sat, 11/02/2013 - 00:12
Rcpp code goes in this book.
By tholscla on Sat, 11/02/2013 - 00:09
I am making available some basic functions that I use often. If you have a recommendation about how I coded something or find a bug, please leave a comment. I write R packages with a mix of R functions and compiled C++ functions (Rcpp library) for speed/efficiency. Code is not guarenteed to work, use at your own risk.
R code and packages
Rcpp (R and C++) functions
Basic Regression Tutorial
Pages