-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rserve.exe error: Information: Fatal error: unable to initialize the JIT, Error in glue(.Internal(R.home()), #195
Comments
Howe did you start |
Hi, I figured it out. To use Rserve with R-4.3.1, I have to update both R_HOME to C:\Program Files\R\R-4.3.1\bin\x64 and update the path environment variable's R part to C:\Program Files\R\R-4.3.1\bin\x64, then I can communicate from Matlab to R via the java binding. One thing is that the R-4.3.1 installed Rserve and RSclient with a version of RSclient: 0.7.9 RServe: 1.8.11. I found that the two jar files: To make it, I went to the official website , and place them inside this folder (delete the two existing jars of java 11.). Although the name differs for RserveEngine.jar vs Rserve.jar, I can load these two jars into MATLAB and communicate with the established Rserve: c = org.rosuda.REngine.Rserve.RConnection('127.0.0.1',aPort); c.eval('library(''RCurl'')'); %ok % load a qs file into Rserve and get data into matlab: |
I load one qs file which is a R vector and get the data into matlab as a REXPGenericVector.
The following fields are true for this data from all the is* fields.
Then I load another qs file which is a very complicated SingleCellExperiment variable that only after I installed many dependent packages I can load this data into the Rstudio working space severe days before. Now I am facing a problem that this complicated data although transferred to matlab, its type is REXPS4.
Why the SingleCellExperiment variable cannot be further analyzed in matlab? Is there a possible way? Update: the toDebugString prints many useful data inside, but they are incomplete because the real data is much longer. They are printed in a chaos manner. I cannot get them organized.
Update 2: end
|
You won't be able to handle S4 objects in matlab, you have to use S4 methods in R to extract what you need from those obejcts or convert them to regular types (like matrices, vectors etc.). Of course, you could manually dig into it the internal structure, but that is highly discouraged, because only the methods know the internal structure, users should never see it and it may change at any point. |
Many years ago I installed R-3.5.1 and Rstudio on Windows8.1. To use R by other applications, I also installed the RServe and RSclient and they worked very well.
Recently for some reason I have to install R-4.3.1 to load some downloaded *.qs files (Quick Serialization of R Objects) into R workspace using package qs. These .qs file-loaded workspace have SingleCellExperiment variables which have many dependent packages that only works on R-4.3.1, that's why I installed R-4.3.1.
To access these data from other applications, I also install.package('Rserve') and install.package('RSclient') on R-4.3.1.
The problem is that although Rserve/RSclient works well inside Rstudio with R-4.3.1,it shows error when called from other applications, or directly run Rserve.exe from command line.
Scenario 1:
RSclient: 0.7.3
RServe: 1.7.3.1
I set R_HOME = C:\Program Files\R\R-3.5.1
then run C:\Users\rmd\Documents\R\win-library\3.5\Rserve\libs\x64\Rserve.exe --RS-port 6312
it opens a normal black window and works OK.
Scenario 2:
RSclient: 0.7.9
RServe: 1.8.11
I set R_HOME = C:\Program Files\R\R-4.3.1
then run C:\Users\rmd\AppData\Local\R\win-library\4.3\Rserve\libs\x64\Rserve.exe --RS-port 6312
I have tested RSclient/RServe inside RStudio and it works well for both Scenario 1 and Scenario 2.
For example, in Scenario 2:
RSclient: 0.7.9
RServe: 1.8.11
I set R_HOME = C:\Program Files\R\R-4.3.1
RStudio select 64-bit C:\Program Files\R\R-4.3.1 then restart
What could be the possible reason for this "unable to initialize the JIT" error?
Could it because my win8.1 system is too old and damaged?( I use system recovery this year because of a virus attack, After that my Windows Update was permanently dead, my serial number was erased, and the .NET is not working (with a very old version of .NET) causing a few of my software unable to work. Win8.1 is also not supported officially now. But my laptop could still support 98%of my needs and I have to keep on it because many codes works on my laptop)
Is there a way to fix it? Or should I change the version of RServe and RSclient?
Thanks a lot.
The text was updated successfully, but these errors were encountered: