Can't load the mailR package in R - r

I would like to load mailR package in both my local rStudio and one run off an ec2 server. I get this error:
> require(mailR)
Loading required package: mailR
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
In addition: Warning message:
package ‘mailR’ was built under R version 3.3.3
If I try to load rJava I get:
> require(rJava)
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
In addition: Warning message:
package ‘rJava’ was built under R version 3.3.2
Thank you for the help!

Related

Problems installing tabulizer. error: JAVA_HOME cannot be determined from the Registry

I know there are a lot of questions on this issue. I have previously solved that problem with:
remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")
but I have instaled R 4.2.1 in a new PC and I am not able to fix it this time,
I have succesfully installed rJava package but when I try above code I get this error:
Error: package or namespace load failed for 'tabulizerjars':
.onLoad failed in loadNamespace() for 'tabulizerjars', details:
call: NULL
error: .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
I have re-installed rJava several times but I keep getting the same error.
I would appreciate any help about it.

Error “.onLoad failed in loadNamespace() for 'tcltk'”

I'm pretty new to R in Ubuntu.
I am running R (3.5.0) in Rstudio 1.1.456 through Anaconda.
The operating system is Ubuntu 18.04.
In R studio I select the package Rcmdr:
> library("Rcmdr", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: carData
Loading required package: sandwich
Loading required package: effects
lattice theme set by effectsTheme()
See ?effectsTheme for details.
Error: package or namespace load failed for ‘Rcmdr’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Can't find a usable init.tcl in the following directories:
/builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library
This probably means that Tcl wasn't installed properly.
I then tried package tcltk by itself:
> library("tcltk", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Can't find a usable init.tcl in the following directories:
/builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library
This probably means that Tcl wasn't installed properly.
Following the question here:
Error ".onLoad failed in loadNamespace() for 'tcltk'"
> capabilities("tcltk")
tcltk
TRUE
Unfortunately the solution above only deals with the case where capabilities("tcltk") comes back with FALSE so I'm stuck at this point!
Also the package tk is showing as installed already in line with the suggestion by J_F in the comments to the original question:
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
Can someone please tell me how to resolve this.

rJava Package installation failed (needed for xlsx package)

When I want to install the xlsx package, I get this error :
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
In addition: Warning message:
package ‘rJava’ was built under R version 3.3.3
Error: package ‘rJava’ could not be loaded
So I tried reinstalling rJava, but I get this :
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
In addition: Warning message:
package ‘rJava’ was built under R version 3.3.3
Error: package or namespace load failed for ‘rJava’
Do you guys have any simple solution to this ? I am not very familiar with R, and I just need it to bootstrap some data.
I had the same error recently (R Error: JAVA_HOME cannot be determined from the Registry). I found the solution here. In brief, Joachim Schork identified the problem as not the xlsx package but rather the rjava package. He explained that the problem usually is, as hartmut said, running a 64 bit version of R and a 32 bit version of Java. To resolve the problem according to his recommendation, you need to download and install the 64 bit version of Java. In my case, the solution included installing Java on my machine as it was never installed previously.

not able to use rJava after installing the package successfully

I am not able to use rJava after installing the package successfully.
library("rJava") Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dirname(this$RuntimeLib) error: a character vector argument expected Error: package or namespace load failed for ‘rJava’

installation of R package results in an error message

I tried to install the R package crypticIBD check but got the follwing error when I tried to use it
> library("CrypticIBDcheck")
load package : rJPSGCS
load package : rJava
Error : .onLoad in loadNamespace() für 'rJava' error, details:
command: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
error: Paket ‘rJava’ can't be found
>
coudl somebody point me into a direction?
I then successfully installed the rJava package and treid to run the package again
: .onLoad in loadNamespace() error for rJava
command: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
error: Paket ‘rJava’ can't be found
>

Resources