How to solve expss package loading problem - r

I would like to install the expss package but it keeps returning an error.
Looked around for other with similar problems and tried re-installing several packages but nothing seems to work. Does anyone have a suggestion how to fixed the problem?
So far i tried re-installing:
install.packages("stringr")
install.packages("knitr")
install.packages("checkmate")
install.packages("htmlwidgets")
install.packages("htmltools")
install.packages("htmlTable")
install.packages("expss")
But Rstudio keeps returning with and error :
Error: package or namespace load failed for ‘expss’:
object 'mtfrm' not found whilst loading namespace 'expss'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/expss’
Warning in install.packages :
installation of package ‘expss’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/cl/5_wnd4b14y7b40zc80n1r3wdkcnbkn/T/RtmpdcLWsn/downloaded_packages’

According to this issue, the current version of expss won't install in versions of R before 4.2. This has recently been fixed in the development version. You could try:
updating your version of R to version 4.2 (probably the simplest solution if you don't need to keep an older version of R)
installing the development version of expss from GitHub: first install the remotes package, then remotes::install_github("gdemin/expss")
install an older version of expss (remotes::install_version("expss", "0.11.1"))

Related

Installation issue with tidyverse package

I am having trouble installing packages, I was not able to install any. I got the following error in my r console:
ERROR: dependency 'cachem' is not available for package 'memoise'
* removing 'C:/Users/VasquezV/Documents/R/win-library/3.4/memoise'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\VasquezV\Documents\R\win-library\3.4" C:\Users\VasquezV\AppData\Local\Temp\1\RtmpuiYtO1/downloaded_packages/memoise_2.0.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘memoise’ had non-zero exit status
The major issue with this problem is that the cli package might not be updated as it often shows 3.1.1 installed but 3.3.0 required. Hence you have two solutions:
install.packages(cli) - there are chances that even this step
might fail as the error message is displayed: "Error in unpacking packages."
Uninstall Cran R and R studio and reinstall it or install the package for replacing the existing one to solve the issue.
This will definitely work as I have solved the issue through this way itself.

Can't install tmap R Package

I am having trouble installing the tmap R package. I am trying to install it using install.packages("tmap") and mn receiving this error:
Error: package or namespace load failed for ‘tmap’ in namespaceExport(ns, exports):
undefined exports: providers
Error: loading failed
Execution halted
ERROR: loading failed
Warning in install.packages :
installation of package ‘tmap’ had non-zero exit status
I'm new to R, but have tried many of the basic bug fix approaches (Reinstalling R Studio, quitting and restarting a session, installing from a local tar.gz instead of CRAN) but none seem to work. I think the package is being installed successfully but is not being loaded. Is that correct? How would I get tmap to load correctly?
I'm using R vers 3.6.1
Cheers
The object providers is re-exported from leaflet. Please make sure that leaflet is installed correctly, and check if leaflet::providers exists.
I would also strongly recommend to upgrade R to 4.x, if possible. I recall that there were some packages in the dependency/imports tree that didn't work well for R 3.x.

Installing tidyjson via CRAN or Devtools

I'm trying to install tidyjson. I looked up CRAN itself, and it appears that tidyjson has been removed from CRAN, but archives still exist and two github repositories still exist holding the package (colearendt/tidyjson and sailthru/tidyjson).
However, I'm having issues downloading the package, either using install.packages or devtools::install_github().
install.packages("tidyjson") produces a warning: package ‘tidyjson’ is not available (for R version 3.6.1)
devtools::install_github() produces an error Error: Failed to install 'tidyjson' from GitHub: (converted from warning) cannot remove prior installation of package ‘rlang’. I get the same error regardless of which of the two repositories I download from.
In neither case does library(tidyjson) then load the package - it is stated not to exist.
Managed to solve this problem by uninstalling and reinstalling rlang through CRAN - the error then occurred for digest. Once I uninstalled and reinstalled devtools::install_github() worked as expected.

Cannot install the shiny package in R

I am trying to install the shiny package in R but I keep getting this error:
ERROR: dependencies 'later', 'promises', 'rlang' are not available for
package 'shiny'
* removing 'C:/Users/sawyer.keels/Documents/R/win-library/3.2/shiny'
The downloaded source packages are in
‘C:\Users\sawyer.keels\AppData\Local\Temp\RtmpuWfNw6\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-32~1.4RE/bin/x64/R" CMD INSTALL -l "C:\Users\sawyer.keels\Documents\R\win-library\3.2" C:\Users\SAWYER~1.KEE\AppData\Local\Temp\RtmpuWfNw6/downloaded_packages/shiny_1.1.0.tar.gz' had status 1
2: In install.packages("shiny") :
installation of package ‘shiny’ had non-zero exit status
If anyone has had this issue in the past I would appreciate the help.
Thanks
Try installing the dependency packages:
install.packages(c("later","promises","rlang"))
After thereafter try to install shiny again:
install.packages("shiny")
Let me know if it works.
I updated r:
install.packages("installr")
and then: updateR()
This made the package run.
Unfortunately, the suggested solution did not solve my case as
I detected the point of glitch as I attempted to install promises, which was magrittr seemed not installed. It was found in the error message lines.
Thus, install.packages("magrittr").
Then promises was installed and httpuv as well.
shiny is now installed normally.
Issue resolved.

Caret package failed to install

I am getting this errors trying to install caret package:
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
Warning in install.packages :
installation of package ‘ddalpha’ had non-zero exit status
ERROR: dependency ‘ddalpha’ is not available for package ‘recipes’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/recipes’
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
ERROR: dependency ‘recipes’ is not available for package ‘caret’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
Any ideas?
install.packages("ddalpha")
It gives the same error:
/usr/lib64/R/library/BH/include/boost/exception/exception.hpp:137: error: expected declaration before end of line
make: *** [AlphaProcedure.o] Error 1
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
I have found a solution.
I had the same problem. After installing caret with all its dependencies, ddalpha was not installed. Then I tried installing the package ddalpha alone. I got the message:
" There is a binary version available but the source version is later:
binary source needs_compilation
ddalpha 1.2.1 1.3.1 TRUE
Do you want to install from sources the package which needs compilation?
y/n: n"
Well, if I anwser yes, it doesn't work. But when I answer no, it does work. It looks like the new version has some problem, but the previous one works fine.
As Roman indicated in the comments, ddalpha and recipes are dependencies that aren't installed yet. You can manually install them as follows:
install.packages(c('ddalpha', 'recipes'))
Alternatively, you can tell the install.packages() command to grab the necessary packages during the install process.
install.packages('caret', dependencies=TRUE)
Or list them explicitly:
install.packages('caret', dependencies=c('ddalpha', 'recipes'))
Or, if you use an IDE such as RStudio, the package manager that's included will automatically handle these dependencies for you.
If these suggestions don't solve the problem, you may try updating your instance of R to the latest (3.4.1 as I write this). Also, ddalpha is dependent on the Rcpp package version 0.11.0 or greater, so you may update that package.
update.packages('Rcpp')
I was facing the same issues, and I had tried almost all the methods mentioned here. But the only one that worked for me was updating my IDE and that sorted it out.
I had the same issue, running
install.packages('caret', dependencies=TRUE)
from console solved it. I don't know why at the packages window install with "install dependencies" checked didn't work..
R studio: 2022.07.1
R: 3.6.3

Resources