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

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:

Related

qdap, rJava load failed

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.

Using any Library to Read Excel files from R

I have R installed in a usb stick (since I'm using work computer and don't have Admin access to install software), and so far I've been having to resort to read.csv() since I can't use any library to read excel files.
For example, XLConnect gives the problem of :
>Error: package or namespace load failed for ‘XLConnect’:
>> .onLoad failed in loadNamespace() for 'rJava', details:<br>
>> call: inDL(x, as.logical(local), as.logical(now), ...)<br>
>> error: unable to load shared object 'D:/R/R-4.0.2/library/rJava/libs/x64/rJava.dll':<br>
> LoadLibrary failure: %1 is not a valid Win32 application.<br>
>In addition: Warning message:
>package ‘XLConnect’ was built under R version 4.0.3
It seems that these libraries (readxl, xlsx, or XLConnect) are failing because they don't know where I have Java installed. So, I also did this:
Sys.setenv(JAVA_HOME='C:\Program Files (x86)\Java\jre1.8.0_131\bin')
but, to no avail. (that advice I got it from https://www.r-statistics.com/2012/08/how-to-load-the-rjava-package-after-the-error-java_home-cannot-be-determined-from-the-registry/)
If someone knows how to read excel files using R from a memory stick - I would really appreciate if they can point north to me.
btw, this is the error when loading xlsx library:
> library(xlsx)
>Error: package or namespace load failed for ‘xlsx’:
>> .onLoad failed in loadNamespace() for 'rJava', details:<br>
>> call: inDL(x, as.logical(local), as.logical(now), ...)<br>
>> error: unable to load shared object 'D:/R/R-4.0.2/library/rJava/libs/x64/rJava.dll':<br>
>> LoadLibrary failure: %1 is not a valid Win32 application.
<br>
>In addition: Warning message:<br>
>package ‘xlsx’ was built under R version 4.0.3
and this is the error when trying to read an excel file with readxl (no problem when loading):
>*Error in loadNamespace(name) : there is no package called ‘cli’*
This is it, this did it:
"You may want to check out this posting: stackoverflow.com/questions/29254067/…" – SteveM 16 hours
Thank you kind stranger.

package or namespace load failed when trying to load 'stats' package in R

I have been trying to work with a git repository and my R 3.6.3 keeps giving me error messages. I have tried reinstalling both R and the stats package, installing Rtools, copying the stats directory from the R folder in other clients but none of seem to be working. The stats package is still found among my packages but R keeps failing to load the .dll file.
The exact error I get is:
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-3.6.3/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-3.6.3/library/stats/libs/x64/stats.dll':

I have a problem installing ConvergenceConcepts package in R, it throws an error message saying that 'ConvergenceConcepts' had non-zero exit status

So, I tried to install a package ConvergenceConcepts in RStudio and it threw me an error message:
ERROR: lazy loading failed for package ‘ConvergenceConcepts’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ConvergenceConcepts’
and a warning, that the package had non-zero exit status. How could I resolve this?
Error loading ConvergenceConcepts library:
Loading required package: tcltk
xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
Error: package ‘tcltk’ could not be loaded
In addition: Warning message:
In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1
Error when I try to add tcltk library:
library(tcltk)
xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
In addition: Warning message:
In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1

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