Error message

  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in book_prev() (line 775 of /home3/gardeoi3/public_html/iamrandom/modules/book/book.module).
  • 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).

Testing newly installed Rcpp

This is a quick test Rcpp module to ensure Rcpp was installed and linked properly to R.  Just run these lines of code in R and the answer should be 9 at the end. 

library(Rcpp)
library(inline)
fx <- cxxfunction(,"",includes=
  ' double add(double c,double d)
   {     double e=0;
         e=c+d;
         return e;
   }
RCPP_MODULE(foo)
   {  function( "add", &add ) ;}
 ', plugin="Rcpp")
foo <- Module("foo",getDynLib(fx))

foo$add(4,5)    #answer is 9