[Rd] RInside, rcpp compilation problem

From: Jeff Goode <jeff__goode_at_hotmail.com>
Date: Wed, 05 Dec 2012 03:00:56 +0000

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_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 05 Dec 2012 - 03:41:25 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Dec 2012 - 04:52:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive