qdap, rJava load failed - r

I have successfully installed all the libraries but below error is not going away
I have tried 3 JDK java-se-8u41-ri ; openjdk11 ; openjdk8 and below error keeps coming, when I open in R-Studio it works but not whe i try to make exe using electron, please advise
stderr:Error: package or namespace load failed for 'qdap':
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users//R-Portable-Win/library/rJava/libs/x64/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.

Related

Issues when starting up RStudio

Just installed R and Rstudio on my laptop, but keep running into this error messages in the console tab. Should I be worried?
Here is the error message:
Error: package or namespace load failed for ‘stats’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'C:/Program Files/R/R-4.0.0/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
During startup
- Warning message:
package ‘stats’ in options("defaultPackages") was not found
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Program Files/R/R-4.0.0/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
The following workaround worked for me.
After all the installs as recommended try this last step.
"Change the name of the .Reviron file in probably your Documents folder to anything else so that it is not found by the code."
This was created for rtools. I renamed it .Renvironx

Can't load any packages in RStudio

I'm very new to R and I'm having problems right off the bat. None of the packages want to load and each time I try, the same error message is being given (see below). What am I doing wrong? Thanks in advance for any help!
library(xlsx)
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
Error: package ‘rJava’ could not be loaded
I have since added JAVA_HOME to my environmental variables but now when I attempt to load a package, a new error pops up (See Below)
library(xlsx)
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/Sam/Documents/R/win-library/3.3/rJava/libs/x64/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Error: package ‘rJava’ could not be loaded

cannot load R package 'tm.plugin.webmining'

I'm using x64 windows 7 and R i386 3.1.1
I installed 'tm.plugin.webmining' package. but when I load this package using
library(tm.plugin.webming)
flowing error occure:
Error : .onLoad is failed at loadNamespace() because of 'rJava':
Call: inDL(x, as.logical(local), as.logical(now), ...)
Error: Cannot load 'C:/Program Files/R/R-3.1.1/library/rJava/libs/i386/rJava.dll':
LoadLibrary failure: Cannot find the module.
I already installed latest jvm. But it doesn't work.
try setting the Java_Home path on R
Sys.setenv(JAVA_HOME="path/java/home")
ie
Sys.setenv(JAVA_HOME=C:/Program Files/Java/jdk1.8.0_05/bin")

Rmpi.dll "could not be found" with DeinoMPI and Rmpi

I'm trying to set up MPI with DeinoMPI on Windows. I've installed DeinoMPI and have my cluster set up there, but when I run library(Rmpi) after starting Rgui.exe through the cluster I get the following error:
> library(Rmpi)
Error : .onLoad failed in loadNamespace() for 'Rmpi', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'D:/Programs/R-3.1.0/library/Rmpi/libs/x64/Rmpi.dll':
LoadLibrary failure: The specified module could not be found.
In addition: Warning message:
package ‘Rmpi’ was built under R version 3.1.1
Error: package or namespace load failed for ‘Rmpi’
Looking at that directory, Rmpi.dll is present in the directory and has read/write access. Anyone have any ideas why it says 'the specified module could not be found'? Or is there some additional config necessary perhaps?
Additionally, if I run Rgui.exe outside of the DeinoMPI cluster and run library(Rmpi), I receive the following pop-up:

Failed loading rJava.dll using Rscript

I run R 3.0.1 through Eclipse and have no problem. I tried to execute some of my R scripts using Rscript.exe but i get the following error:
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'H:/R/R-3.0.1/library/rJava/libs/x64/rJava.dll':
LoadLibrary failure: The specified path is invalid.
I have checked and the DLL exists in the directory.
Do you have any suggestion?
Thanks.
Regards
Solved by Adding
if (Sys.getenv("JAVA_HOME")!="")
Sys.setenv(JAVA_HOME="")

Resources