Can't install package 'Liszt' (not in CRAN) in R 3.6.3 - r

I want to install a package that is not found in CRAN.
Below is a downloadlink to the package.
The package makes use of JAGS, of which i have the 64 bit 4.3.0 version of.
rjags and r2jags packages are installed. Rtools is connected to the pathway. I checked this using
Sys.which("make")
## "C:\\rtools40\\usr\\bin\\make.exe"
Connection to path was done with devtools from this Stacklink:
How to add Rtools\bin to the system path in R
I use the following code to install the downloaded .tar.gz package:
install.packages("C:/Program Files/R/R-3.6.3/Liszt_0.8-5_1.tar.gz", repos=NULL,
type="source")
The package won't installl, instead i get the following error:
* installing *source* package 'Liszt' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'Liszt'
finding HTML links ... done
A3ModelFun html
A5ModelFun html
Caterpillar html
LL html
Liszt-package html
extract html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'rjags':
.onLoad failed in loadNamespace() for 'rjags', details:
call: fun(libname, pkgname)
error: Failed to locate any version of JAGS version 4
The rjags package is just an interface to the JAGS library
Make sure you have installed JAGS-4.x.y.exe (for any x >=0, y>=0) from
http://www.sourceforge.net/projects/mcmc-jags/files
Error : package 'rjags' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/Sneve/Documents/R/win-library/3.6/Liszt'
Warning in install.packages :
installation of package ‘C:/PROGRA~1/R/R-36~1.3/Liszt_0.8-5_1.tar.gz’ had non-zero exit status
I am trying for a while no, but no success. Any help is much appreciated.
Website providing the package:
http://www.possinghamlab.org/2016-05-30-04-33-10/list-length-analysis.html
package is available here:
http://www.possinghamlab.org/images/LLA/Liszt_0.8-5_1.tar.gz

I installed the 64 Bit version of JAGS. Appearently, the package needs both the 32 and the 64 bit version installed on the PC to be able to work. After i installed also the 32 bit version of JAGS, package installed with no problem.

Related

Cannot install vroom under R.4.0.5 on HPC node

To install another package that depends on vroom (which failed) on a HPC node, I sought to install vroom manually.
I tried to install the package manually but it fails too:
My code:
install.packages("vroom")
error message:
installing to /home/leuph1/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-vroom/00new/vroom/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘vroom’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/leuph1/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-vroom/00new/vroom/libs/vroom.so':
/home/leuph1/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-vroom/00new/vroom/libs/vroom.so: undefined symbol: __cxa_init_primary_exception
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/leuph1/R/x86_64-pc-linux-gnu-library/4.0/vroom’
Warning in install.packages :
installation of package ‘vroom’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpgPcp9Y/downloaded_packages’
I have tried under different R versions (3.5.3 up to 4.1.1) but keep having the same issue no matter what version I chose.
I have also deleted any 00LOCK-"package-name" folder that might have arisen in the process in the corresponding R Version package folder, but to no avail.
Can anybody help me out here?
Many thanks in advance,
Philibertus88

Issues installing data.table in R 3.6.3 (Oct 2020)

I'm using a Mac with OS Sierra 10.12.5. I'm having trouble with installing the R package "data.table," including if I try to install via install.packages("Hmisc"), or install.packages("data.table"). Both result in:
installing to /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘data.table’ in library.dynam(lib, package, package.lib):
shared object ‘datatable.so’ not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/data.table’
The downloaded source packages are in
‘/private/var/folders/bl/lgd7_j2j087f24tcly84xg580000gn/T/RtmpbM5EaD/downloaded_packages’
Warning message:
In install.packages("data.table") :
installation of package ‘data.table’ had non-zero exit status
I then tried installing directly from the .zip at: https://github.com/Rdatatable/data.table, but got the following "not available for R 3.6.3" message:
> install.packages("~/Downloads/data.table-master.zip")
Warning message:
package ‘~/Downloads/data.table-master.zip’ is not available (for R version 3.6.3)
I tried the approaches in this thread, but none worked :\ : Problems installing data.table for R
Any advice for what I can try next, or where I can access a version of data.table specifically for R 3.6.3?

Trouble with installing r2excel package in R

I am trying to install r2excel package in R via install_github but I get this error
> install_github("kassambara/r2excel")
several lines appearing in the console and I get
* installing *source* package 'r2excel' ...
** R
** preparing package for lazy loading
Warning: package 'xlsx' was built under R version 3.4.4
** help
*** installing help indices
converting help for package 'r2excel'
finding HTML links ... done
getOS html
r2excel-package html
xlsx.addHeader html
xlsx.addHyperlink html
xlsx.addLineBreak html
xlsx.addParagraph html
xlsx.addPlot html
xlsx.addTable html
xlsx.openFile html
xlsx.readFile html
xlsx.writeFile html
xlsx.writeMultipleData html
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning: package 'xlsx' was built under R version 3.4.4
Error: package or namespace load failed for 'xlsx':
.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.
Error : package 'xlsx' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
Warning: package 'xlsx' was built under R version 3.4.4
ERROR: loading failed for 'i386'
* removing 'C:/Users/myusername/Documents/R/win-library/3.4/r2excel'
In R CMD INSTALL
Installation failed: Command failed (1)
So I get this error on 'xlsx' loading
What is weird is that I have no trouble loading 'xlsx' and 'rJava' individually with
library(xlsx)
I have a x64 java installed (build 1.8.0_161-b12) and a x64 rStudio running so I really don't know where the problem is coming from.
According to liuyanguu in https://github.com/kassambara/r2excel/issues/6:
"This package was not built in 64 bits system so we cannot install it this way. But you can still use all the functions by clone the repo and source or just copy-paste "/R/r2excel.r". There is actually no need to install the package."

Unable to install xlsx package in Rstudio

I tried installing xlsx package in R.
install.packages("xlsx")
installing *source* package 'xlsx' ...
** package 'xlsx' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
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.
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/hi/Documents/R/win-library/3.3/xlsx'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\hi\Documents\R\win-library\3.3" C:\Users\hi\AppData\Local\Temp\RtmpSGp15V/downloaded_packages/xlsx_0.6.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘xlsx’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\hi\AppData\Local\Temp\RtmpSGp15V\downloaded_packages’
Then I ran the library function too
library(xlsx)
Error in library(xlsx) : there is no package called ‘xlsx’
To ensure that whether the package has been installed itself or not I ran
grepl("xlsx",installed.packages())
# It returns "FALSE" 649 times in a row.
I read online about how some rjava packages need to be installed as well so I tried to
install.packages('rJava')
install.packages("xlsxjars")
package ‘rJava’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\hi\AppData\Local\Temp\RtmpSGp15V\downloaded_packages
To ensure grepl("rJava",installed.packages())
Again I got "FALSE" 649 times.
I recently had a similar problem with another package and have had loads of headaches with R and Java integration. My understanding is that you have to install Java for each architecture you're using. If R is trying to install xlsx for both architectures and you've only got the 64-bit java installed, it would cause a failure like the one you got. You could try:
install.packages("xlsx", INSTALL_opts=c("--no-multiarch"))
This would keep it from trying to install the xlsx for the 32-bit architecture.
I had the same problem a few months ago. In my case, the solution was installing both versions of java (32-bit and 64-bit architecture). On windows 10 the 32-bit architecture should be installed on path ./programfiles (x86)/... and the 64-bit architecture should be installed on ./programfiles/... Both java installer can be found on the official web page.
After installing both architectures of java, it is necessary to make sure that JAVA HOME environtment is declared as empty string. Sys.getenv("JAVA HOME") = "".
This steps works for me. I hope that my solution works for you.

XMLSchema 0.8.0 Error in R 3.2.0 on Windows

I'm trying to install the development version (v. 0.8.0) of XMLSchema in R 3.2.0 on a Windows 64-bit computer.
Unfortunately, the release version (v. 0.7.0) doesn't work for the database I am trying to access.
However, when I try to install 0.8.0 from source, I get the following error:
> install.packages("XMLSchema", type="source", repos = NULL)
Installing package into ‘C:/Users/Will/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
* installing *source* package 'XMLSchema' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in .mergeMethodsTable(generic, mtable, tt, attach) :
trying to get slot "defined" from an object of a basic class ("list") with no slots
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/Users/Will/Documents/R/win-library/3.2/XMLSchema'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Will\Documents\R\win-library\3.2" "XMLSchema"' had status 1
Warning in install.packages :
installation of package ‘XMLSchema’ had non-zero exit status
Any thoughts or insight would be greatly appreciated.
The package worked for previous versions of R, perhaps it's a compatibility problem?
Thanks.

Resources