loading failed error when install R package from github - r

I am working on Bayesian inference and I want to install bayesVAR_TVP package from Github. I tried the following commands:
install.packages("devtools")
library(devtools)
install_github("GediminasB/bayesVAR_TVP")
and
install.packages("githubinstall")
gh_install_packages("bayesVAR_TVP")
In both case I received the following error:
Error: package or namespace load failed for 'bayesVARTVP' in library.dynam(lib, package, package.lib):
DLL 'bayesVAR' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
Error: package or namespace load failed for 'bayesVARTVP' in library.dynam(lib, package, package.lib):
DLL 'bayesVAR' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Hamed/Documents/R/win-library/3.4/bayesVARTVP'
In R CMD INSTALL
Installation failed: Command failed (1)
I have checked some similar questions on this site but they could not help me. I am working on a Win 7 64b and R 3.4.3. Also, my friend has a similar error on mac system. Does anyone have any idea? Thanks beforehand.

Related

install.packages("fields") gives an error message

I am currently using RStudio 2022.07.1+554 in Windows 11 and I encounter an error message every time I install.packages("fields"). Here is the error message I receive:
Error: package or namespace load failed for 'fields' in library.dynam(lib, package, package.lib):
DLL 'maps' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'.
How can I install RStudio?

Problem in installing 'RMongo' throws rJava error even though library(rJava) works fine

install.packages("RMongo")
doesn't works (seems like it has been deprecated.
So, I was trying to install using devtools.
devtools::install_github("tc/Rmongo")
but it gives out error
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/saini/OneDrive/Documents/R/win-library/3.5/rJava/libs/i386/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Error : package 'rJava' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
Warning: package 'rJava' was built under R version 3.5.2
ERROR: loading failed for 'i386'
* removing 'C:/Users/saini/OneDrive/Documents/R/win-library/3.5/RMongo'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/saini/AppData/Local/Temp/RtmpuEHfqO/file20f419985c01/RMongo_0.1.0.tar.gz’ had non-zero exit status
Even though library(rJava) works fine.
JDK, JRE are both 64 bit. R and R studio are also 64 bits.
Someone suggested to use
R CMD javareconf
but it doesnot recongnises javareconf.
Also, I've set Environment Variables.

loading failed in installing R package fdaPDE from github

Good morning,
I am trying to install the R package fdaPDE from GitHub repository "NegriLuca/fdaPDE-manifold" via RStudio1.4, using the package devtools. My OS is Windows 10, I am using Rtools35 and R3.5.1. The package has to be compiled from source. I have typed the following:
install.packages('devtools')
library(devtools)
install_github("NegriLuca/fdaPDE-manifold")
and got the following:
[… I omit the long compilation part …]
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error: package or namespace load failed for 'fdaPDE'inlibrary.dynam(lib, package, package.lib):
DLL 'fdaPDE' not found: maybe not installed for this architecture?
Errore: loading failed
Esecuzione interrotta
*** arch - x64
Error: package or namespace load failed for 'fdaPDE' in library.dynam(lib, package, package.lib):
DLL 'fdaPDE' not found: maybe not installed for this architecture?
Errore: loading failed
Esecuzione interrotta
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Gianmaria/Documents/R/win-library/3.5/fdaPDE'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/GIANMA~1/AppData/Local/Temp/RtmpwDxgqJ/file466865be7d8c/fdaPDE_0.1-5.tar.gz’ had non-zero exit status
What can I do to fix this?
I have finally managed to install the package. What I did was the following:
-REMOVE previous installations (I had supposed that to be done automatically but it was not, and I had an older version installed) by typing in Rstudio
remove.packages("fdaPDE")
-In Windows cmd, after having downloaded the code from Github, type
"Path/to/Rfolder/R" CMD BUILD <path to folder fdaPDE>
"Path/to/Rfolder/R" CMD INSTALL -l <path name of the R library tree> <path name of the package to be installed>
Hope that this may be useful for other people who faces similar errors.

Error: package ‘rJava’ could not be loaded when installing xlsx

Im trying to install the xlsx package. Installing works fine but when i load the library I get the following error:
> require(xlsx)
Loading required package: xlsx
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 messages:
1: package ‘xlsx’ was built under R version 3.2.3
2: package ‘rJava’ was built under R version 3.2.3
Failed with error: ‘package ‘rJava’ could not be loaded’
I googled around and say that installing the right version of Java might be the issue. However, when I downloaded the newest version and started a new r-session I still get the same issue.
Are there more people experiencing this issue? And some quick fix?
I am using Linux and when I update R or Java to use the rJava library (needed by xlsx) I need to run this commands form a shell (outside the R session)
sudo su -
R CMD javareconf
I hope this helps.

Error while installing R packages : Tcl/Tk support is not available on this system

I am using Linux- fedora 14 64 bit machine. While installing some of R packages , eg : DEGseq and sqldf , I am facing this error. I manually install all tcl and tk devel and core libraries using yum but the problem still persisting.
The error i am encountering while installing packages:
Warning: S3 methods ‘$.tclvar’, ‘$<-.tclvar’, ‘as.character.tclObj’, ‘as.character.tclVar’, ‘as.double.tclObj’, ‘as.integer.tclObj’, ‘as.logical.tclObj’, ‘as.raw.tclObj’, ‘print.tclObj’, ‘[[.tclArray’, ‘[[<-.tclArray’, ‘$.tclArray’, ‘$<-.tclArray’, ‘names.tclArray’, ‘names<-.tclArray’, ‘length.tclArray’, ‘length<-.tclArray’, ‘tclObj.tclVar’, ‘tclObj<-.tclVar’, ‘tclvalue.default’, ‘tclvalue.tclObj’, ‘tclvalue.tclVar’, ‘tclvalue<-.default’, ‘tclvalue<-.tclVar’, ‘close.tkProgressBar’ were declared in NAMESPACE but not found
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Tcl/Tk support is not available on this system
Error : package/namespace load failed for ‘tcltk’
Error : unable to load R code in package ‘gsubfn’
ERROR: lazy loading failed for package ‘gsubfn’
* removing ‘/home/xuserL/R/x86_64-unknown-linux-gnu-library/2.15/gsubfn’
ERROR: dependency ‘gsubfn’ is not available for package ‘sqldf’
* removing ‘/home/xuser/R/x86_64-unknown-linux-gnu-library/2.15/sqldf’
I am unable to find the solution even after googling about this error.
Please tell me the set of steps i need to follow in order to sort out this problem?
Thanks in advance :)

Resources