I am running this example, through terminal. But got fatal error: RInside.h: No such file or directory error for the the line, #include<RInside.h>.
Its a interface to R from c++. I have RInside package in R.
my code:
#include<iostream>
#include<RInside.h>
using namespace std;
int main(){
int a=12;
cout<<a<<endl;
return 0;
}
Same error occurred for #include<Rcpp.h> header.
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
NumericVector callFunction(NumericVector x, Function f) {
NumericVector res = f(x);
return res;
}
Package RInside version 0.2.14
Package Rcpp version 0.12.17
The
GNUmakefileshipped withRInsidein theexamplesfolder includes things like:If you use GNU make, you can probably use this literally. Otherwise you will have to adapt it for your build environment. Please look at the provided examples for more details.