For some reason the R programming 4.1.1 is automatically uninstalled by Windows 10 and it is replaced by R 4.2.2.
I tried to keep both 4.1.1 and 4.2.2 at the same time but for some reason the 4.1.1 is kept being uninstalled by Windows.
If I run the R.Net application in VB.Net 2017 with R 4.2.2, I get an error in the following line:
REngine.SetEnvironmentVariables()
The error message is:'Object reference not set to an instance of an object.'
I added strings in the SetEnvironmentVariables such as
Dim rhome As String = "C:\Program Files\R\R-4.2.2"
Dim rpath As String = "C:\Program Files\R\R-4.2.2\bin\x64"
REngine.SetEnvironmentVariables(rhome, rpath)
Dim Rstat As REngine = REngine.GetInstance()
but it keeps giving me the following error message in the next line (Dim Rstat As REngine = REngine.GetInstance()`): 'This 32-bit process failed to load the library R.dll. Native error message is 'The handle is invalid'
Can anyone help me by
How to prevent windows patch automatically uninstall R 4.1.1.
Work a solution with R 4.2.2 to prevent getting the above error messages.
Thanks
If I run the R.Net application in VB.Net 2017 with R 4.2.2, I get an error in the following line:
REngine.SetEnvironmentVariables()
The error message is:'Object reference not set to an instance of an object.'
I added strings in the SetEnvironmentVariables such as
Dim rhome As String = "C:\Program Files\R\R-4.2.2"
Dim rpath As String = "C:\Program Files\R\R-4.2.2\bin\x64"
REngine.SetEnvironmentVariables(rhome, rpath)
Dim Rstat As REngine = REngine.GetInstance()
but it keeps giving me the following error message in the next line (Dim Rstat As REngine = REngine.GetInstance()`): 'This 32-bit process failed to load the library R.dll. Native error message is 'The handle is invalid'
Can anyone help me by
How to prevent windows patch automatically uninstall R 4.1.1.
Work a solution with R 4.2.2 to prevent getting the above error messages.
Thanks
Related
I made an R script that generates a command line that's supposed to launch a MATLAB ".exe" file with parameters.
The generated command line looks like this:
cmd = "X:\matlabscript.exe [xxx,xxx,...]"
Then I enter the command in the shell:
shell(cmd)
And I get this error:
Error: Could not find version 9.7 of the MATLAB Runtime.
Attempting to load mclmcrrt9_7.dll.
Please install the correct version of the MATLAB Runtime.
Contact your vendor if you do not have an installer for the MATLAB Runtime.
Warning message:
In shell(cmd) :
l'exécution de 'X:\matlabscript.exe [xxx,xxx,...]' a échoué avec le code d'erreur 65535
When I copy-paste the command in CMD.exe it works fine.
I also added the runtime path in the system environment variables "path" but it didn't change anything.
How can I launch the MATLAB Runtime via R?
Problem solved...
I had to restart the computer as restarting only the R session wasn't enough.
It's working fine now !
I want to call an R script using Java. I am trying the JRI method to call the R script. However my JVM gets terminated when creating an Rengine.
I am running one of the examples which has been provided alongside rJava library installation in R.
Code I have tried
Version 1:
`Rengine re=new Rengine(args, true, new TextConsole2());`
Version 2:
`Rengine re=new Rengine(args, false, new TextConsole());`
Version 3:
`Rengine re = new Rengine(new String[] { "--vanilla" }, false, null);`
All three have terminated the JVM while they were getting executed.
I am using STS 3.9.1 and have exposed the below variables before running the Java program
java.library.path - pointing to the r java dll's
R_HOME - pointing to the R.exe
PATH - reinforcing the systems path with the paths of rJava dll's and R.exe
I am using R-3.5.0, followed all steps as per
Study Trails - R and Java
and Mavlarn - R and Java but still facing the same issue.
What could I be doing wrong ?
I am using bioconductor for WES pipeline and I am using tk_choose.dir for selection of directory (and store it for further use) where user has stored input files. Here the command lines
library(tcltk)
dataDir <- dirname(tk_choose.dir(default = " ", caption = "Select Directory for input fastq files"))
But these command lines shows some error, shown below (although library(tcltk) is working fine)
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
[tcl] invalid command name "tk_chooseDirectory".
Any hint guys, I am not able to figure out if library is already installed and loaded then why this command is not working. I am using R version 3.4.3 and bioconductor version 3.2
Thanks.
I have created a C# console project using Visual Studio 2008 and OracleClient (OCI) libraries to connect to a Oracle 11g database. This code works in Windows. I copied the whole project into Linux and Open the solution using MonoDevelop 4.2.3. But while running the project, the Database Open call throws an exception
string connectionString = "Data Source=Test; User ID=UID; Password=PWD"
OracleConnection conn = new OracleConnection()
conn.ConnectionString = connectionString;
conn.Open();
Exception:
System.DllNotFoundException: libclntsh.so at (wrapper
managed-to-native)
System.Data.OracleClient.Oci.OciCalls/OciNativeCalls:OCIEnvCreate
The libclntsh.so file is under the location /home/dbuser/instantclient_12_1
I have set the environment variable by adding the below in the /home/dbuser/.bashrc file and rebooted the system.
export
LD_LIBRARY_PATH=/home/dbuser/instantclient_12_1:$LD_LIBRARY_PATH
But still I am getting the same error. I couldn't find any option to include the Libraries in the MonoDevelop.
Thanks
Looks like LD_LIBRARY_PATH environment variable is not set up correctly or does not get applied.
Try creating additional linker configuration file instead with the following command:
echo /home/dbuser/instantclient_12_1 > /etc/ld.so.conf.d/instantclient.conf
Then as root update linker cache with command:
ldconfig
Restart MonoDevelop and try again.
I have resolved the issue by doing the following
echo $ORACLE_HOME/lib > /etc/ld.so.conf.d/dbconf.conf
set the$ORACLE_HOME, $ORACLE_INCLUDE_PATH and $ORACLE_LIB_PATH to
/etc/profile.d
Because of some reason MonoDevelop IDE is not picking the library libclntsh.so if I use the OCI client libraries
I have this part of code:
Rconnection *rc = NULL;
rc = new Rconnection();
int stat=rc->connect();
Rmessage *msg=new Rmessage();
Rmessage *cmdMessage=new Rmessage(CMD_eval, "sumwe(2,3)");
int res=rc->request(msg,cmdMessage);
int r = CMD_STAT(msg->head.cmd);
as you can identify I have specified wrong R function name sumwe. For this I got in Rserve console by saying "Error: could not find function "sumwe""
But while checking value in r i.e CMD_STAT(msg->head.cmd); getting 127(hex 7f). I am expecting #define ERR_unsupportedCmd 0x49 /* unsupported command */ or
#define ERR_unknownCmd 0x4a /* unknown command */ - the difference.`
Please help me what I am doing wrong.
details:
R version 2.15.0 (2012-03-30)
Rserve version 0.6-8 (338)
Platform Windows(32bit). Rserve running locally.
The ERR_unsupportedCmd refers to the Rserve QAP1 protocol, i.e. commands like CMD_eval. You are sending a valid command CMD_eval so Rserve is not complaining -- the error is in R so regular R rules apply. As far as Rserve is concerned R aborted the evaluation. If you want the R error back, you can use try({...}, silent=TRUE) and you get an error as an object of class try-error containing the error string.