I have spent some hours browsing the RInside and rcpp documentation, lots of 
it; but ... as a programmer of C++ since 1990, on both Windows and Unix ... ( 
Solaris and Ubuntu, and Mandrake/Mandrivo Linux); I see a minor problem ......  
Where is the rcpp.h header file??  The below code fails to compile as the 
RInside.h header file references the rcpp.h header file, which is not included 
with RInclude download. This is the sample code provided in one of the RInside 
manuals: 
#include <iostream> 

#include <RInside.h>                            // for the embedded R via 
RInside
rcpp::NumericMatrix createMatrix(const int n) {
    Rcpp::NumericMatrix M(n,n);
    for (int i=0; i<n; i++) {
        for (int j=0; j<n; j++) {
            M(i,j) = i*10 + j; 
        }
    }
    return(M);
}                                         
        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to