Not able to install RWeka - r

I am facing issues while installing the RWeka package. I tried installing rJava but even that is not being installed, can someone help here with the issue? You can follow the code for the error message
> install.packages("RWeka")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/1911120/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
RWeka 0.4-42 0.4-43 FALSE
installing the source package ‘RWeka’
trying URL 'https://cran.rstudio.com/src/contrib/RWeka_0.4-43.tar.gz'
Content type 'application/x-gzip' length 451318 bytes (440 KB)
downloaded 440 KB
* installing *source* package 'RWeka' ...
** package 'RWeka' successfully unpacked and MD5 sums checked
** using staged installation
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** R
** inst
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
Execution halted
ERROR: lazy loading failed for package 'RWeka'
* removing 'C:/Users/1911120/Documents/R/win-library/3.6/RWeka'
Warning in install.packages :
installation of package ‘RWeka’ had non-zero exit status

Related

Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding

I need to install the “lifecycle” package in order to run an R code but I’m getting the error below.
I’ve already uninstalled and re-installed both RTools and R for Windows with no luck.
The WARNING message states to install the appropriate version of Rtools before proceeding – how do I find out what the ‘appropriate’ version that I would need to install?
>install.packages("lifecycle")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘c:/RLibrary’
(as ‘lib’ is unspecified)
also installing the dependency ‘cli’
There are binary versions available but the source versions
are later:
binary source needs_compilation
cli 2.5.0 3.4.1 TRUE
lifecycle 1.0.0 1.0.3 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/cli_2.5.0.zip'
Content type 'application/zip' length 534931 bytes (522 KB)
downloaded 522 KB
package ‘cli’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\X\AppData\Local\Temp\RtmpM95qM9\downloaded_packages
installing the source package ‘lifecycle’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.3.tar.gz'
Content type 'application/x-gzip' length 106854 bytes (104 KB)
downloaded 104 KB
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'c:/RLibrary/rlang/libs/x64/rlang.dll':
LoadLibrary failure: The specified procedure could not be found.
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> library.dynam -> dyn.load -> inDL
Execution halted
ERROR: lazy loading failed for package 'lifecycle'
* removing 'c:/RLibrary/lifecycle'
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status

Can no longer install rgeos and rgdal in R

I cannot install rgeos or rgdal packages in R version 4.1.3. These packages worked fine a month ago before I reformatted my computer and reinstalled R.
This is what I have tried:
install.packages('rgeos', type="source")
install.packages('rgdal', type="source")
This is the message I get when installing - and I DO have Rtools installed.
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/bhauptman/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rgeos_0.5-9.tar.gz'
Content type 'application/x-gzip' length 290240 bytes (283 KB)
downloaded 283 KB
* installing *source* package 'rgeos' ...
** package 'rgeos' successfully unpacked and MD5 sums checked
** using staged installation
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'rgeos'
* removing 'C:/Users/bhauptman/Documents/R/win-library/4.1/rgeos'
* restoring previous 'C:/Users/bhauptman/Documents/R/win-library/4.1/rgeos'
Warning in install.packages :
installation of package ‘rgeos’ had non-zero exit status
The downloaded source packages are in ‘C:\Users\bhauptman\AppData\Local\Temp\Rtmp0sTf6q\downloaded_packages’

Getting an error message when installing psych package

The message I get:
Installing psych:
Installing package into 'C:/.../Documents/R/win-library/4.0'
(as 'lib' is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
psych 2.1.9 2.2.3 FALSE
installing the source package 'psych'
trying URL 'https://cran.rstudio.com/src/contrib/psych_2.2.3.tar.gz'
Content type 'application/x-gzip' length 1928530 bytes (1.8 MB)
==================================================
downloaded 1.8 MB
* installing *source* package 'psych' ...
** package 'psych' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error: unexpected symbol in "tools:::makeLazyLoading("psych", 'C:..."
Execution halted
ERROR: lazy loading failed for package 'psych'
* removing '.../Documents/R/win-library/4.0/psych'
The downloaded source packages are in
'C:...Temp\Rtmpe405Ws\downloaded_packages'
<U+2714> Package 'psych' successfully installed.
Warning message:
In utils::install.packages("psych", repos = "https://cran.rstudio.com/") :
installation of package 'psych' had non-zero exit status

New to R Studio. library(devtools) not loading. Error: package or namespace load failed for ‘devtools’. Is there a way out?

I am new to RStudio.
I am trying to load devtools so that I can install packages from github
So basically what I am trying to do is:
install.packages("devtools")
load(devtools)
install_github("author/package")
Ideally these three steps should have gone through without a hitch. But this is what happened.
library(devtools)
Error: package or namespace load failed for ‘devtools’:
.onLoad failed in loadNamespace() for 'pkgload', details:
call: NULL
error: package ‘backports’ does not have a namespace
What do I do? I am completely new to this.
Here's the whole console
> install.packages("devtools")
Installing package into ‘C:/Users/Rohan Gopakumar/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
devtools 2.3.0 2.3.1 FALSE
installing the source package ‘devtools’
trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.3.1.tar.gz'
Content type 'application/x-gzip' length 373604 bytes (364 KB)
downloaded 364 KB
* installing *source* package 'devtools' ...
** package 'devtools' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'pkgload', details:
call: NULL
error: package 'backports' does not have a namespace
Execution halted
ERROR: lazy loading failed for package 'devtools'
* removing 'C:/Users/Rohan Gopakumar/Documents/R/win-library/4.0/devtools'
* restoring previous 'C:/Users/Rohan Gopakumar/Documents/R/win-library/4.0/devtools'
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Rohan Gopakumar\AppData\Local\Temp\Rtmpasaxsp\downloaded_packages’
> library(devtools)
Error: package or namespace load failed for ‘devtools’:
.onLoad failed in loadNamespace() for 'pkgload', details:
call: NULL
error: package ‘backports’ does not have a namespace

Why is the ggplot2 installation failing?

I'm trying to install the ggplot2 package, so that I make use of ggplot function for my graphs but it keeps failing me. Where is the problem?
> install.packages("ggplot2")
Installing package into ‘C:/Users/Augustinho/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
ggplot2 3.3.0 3.3.1 FALSE
installing the source package ‘ggplot2’
trying URL 'https://cran.stat.unipd.it/src/contrib/ggplot2_3.3.1.tar.gz'
Content type 'application/octet-stream' length 3035612 bytes (2.9 MB)
downloaded 2.9 MB
* installing *source* package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error : .onLoad failed in loadNamespace() for 'pillar', details:
call: utils::packageVersion("vctrs")
error: package 'vctrs' not found
ERROR: lazy loading failed for package 'ggplot2'
* removing 'C:/Users/Augustinho/Documents/R/win-library/3.5/ggplot2'
In R CMD INSTALL
The downloaded source packages are in
‘C:\Users\Augustinho\AppData\Local\Temp\RtmpM7MaYn\downloaded_packages’
Warning messages:
1: In readRDS(dest) : lzma decoding result 10
2: In install.packages("ggplot2") :
installation of package ‘ggplot2’ had non-zero exit status
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
As you are on Windows, try to install the binary version with dependencies:
install.packages("ggplot2",
type = "binary",
dependencies = TRUE,
repos = "https://cloud.r-project.org")
Edit:
Helped first running:
install.packages("vctrs", type = "binary", dependencies = TRUE, repos = "https://cloud.r-project.org")
to skip some vctrs installation error.

Resources