I try to use R.Net in an asp.net Razor App with docker support. The docker image is Debian 10, R is installed in the image under the standard path /usr/lib/R. When executing
REngine.SetEnvironmentVariables(rHome:"/usr/lib/R"); // or any other path including none
REngine engine = REngine.GetInstance();
I obtain the error R home directory is not defined. If I open a shell into my container and start R, R.home() returns /usr/lib/R. So it looks as if R in the container has a R home directory set, but r.net isn't recognizing it? Any ideas what I could try to fix this?
You most likely invoke R the wrong way. Use
/usr/bin/Rwhich is a frontend which setsR_HOMEfor further use by the other components.