eddelbuettel/rinside

RInside.h: No such file or directory

Closed this issue · 5 comments

I'm so sorry of coming back to an issue that is already solved. I am not very good at programming. I am still learning. So, an explanation in easy words will help me.

I installed R version 3.4.1. I use it through Rstudio. I also installed required tools and package as Rtools (under the path C:\Rtools), and the Rcpp, Rinside, RcppArmadillo packages.

I have previously used RcppArmadillo and it deals very well. I posted an example using RcppArmadillo for performing a bootstrap on my own website and that is great. But RInside does not still work. I have not space in my R installing path (that is c:\R). but I obtain this error

capture

Can anyone help me ? Why does RInside.h file not find although I installed the packages and tools ? I saw many people encounter this problem but I do not understand how they have solved it.

Thanks!

It is an error in your assumptions / understanding that you can just use sourceCpp() with RInside.

You cannot. Because it makes no sense. RInside is for creating standalone executables. sourceCpp() is for callable functions. Not the same thing.

Now, if you insist on the above, you can still do it by manually setting the PKG_CXXFLAGS to the proper include directory, for example via Sys.setenv(). We have examples of that in the Rcpp Gallery.

I was trying to do this for parallel computation. Can I not create several R sessions using RInline? I want to use a user defined R function and be able to evaluate it parallel from within Rcpp.

You can use R code to call R functions in parallel -- start maybe with the vignette for package parallel included with R.

Thanks for the quick reply! So, does this mean that a parallel R function used as an input to an Rcpp function as Rcpp::Function will run in parallel when called from within the Rcpp function? I guess I could try to check if this works!

Please ask generic question about generic R use on the R lists. There is a list dedicated to this: r-sig-hpc. Subscribe first, then post.

This is not the forum for these questions so I am locking this. I hope you understand.