BioMedR error message
1
0
Entering edit mode
@adham_star50-14727
Last seen 6.5 years ago

Hello,

I've installed "BioMedR" package on my computer, I run the following command to run the package:

library("BioMedR", lib.loc="~/R/win-library/3.4")

however, I can't get it running because of this error message:

-------------------------------------------------------------------------------------------------------------------------------

Error: package or namespace load failed for ‘BioMedR’:

 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dirname(this$RuntimeLib)
  error: a character vector argument expected
---------------------------------------------------------------------------------------------------------------------------------

Could you please help me to solve this issue?

Thanks and best regards,

Adham

BioMedR • 635 views
ADD COMMENT
0
Entering edit mode
@adham_star50-14727
Last seen 6.5 years ago

I found the solution:
to solve the problem of rJava, follow this procedure:

1- install the latest version of java and make sure it matches the R version you use, 64 bit or 32 bit.

2- type this line before calling rJava:


Sys.setenv(JAVA_HOME="C:/Program Files/Java/jre1.8.0_151/")

this command sets JAVA_HOME to the latest version you installed on computer(jre1.8.0_151 may be different in your case, so find the correct name of the file and type it)

then call rJava:
library("rJava")

----------------------OR--------------------------------

type the following command:
if (Sys.getenv("JAVA_HOME")!="")
  Sys.setenv(JAVA_HOME="")

this command sets the JAVA_HOME to null, then call rJava:
library(rJava)

both solutions worked very fine for me,however, I prefer the first one.

You can find a wonderful discussion of this problem on the following link:

https://stackoverflow.com/questions/7019912/using-the-rjava-package-on-win7-64-bit-with-r

Good luck ...

ADD COMMENT

Login before adding your answer.

Traffic: 847 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6