Reputation: 11
I just wanted to install the package "questionr". But the following error keeps occuring. The package that was supposed to be installed cannot be loaded (library(package)) neither I can find the package within the folder 3.5. Never had this problem before.
Do you have any idea whats the matter here? I'd appreciate your help! Thanks
install.packages("questionr")
Installing package into ‘C:/Users/bisc048/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rlang’, ‘vctrs’, ‘haven’, ‘labelled’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.4.5 0.4.7 TRUE
vctrs 0.2.4 0.3.4 TRUE
haven 2.2.0 2.3.1 TRUE
labelled 2.2.2 2.7.0 FALSE
questionr 0.7.0 0.7.2 FALSE
Binaries will be installed
Warning in install.packages :
packages ‘rlang’, ‘vctrs’ are in use and will not be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/haven_2.2.0.zip'
Content type 'application/zip' length 1050152 bytes (1.0 MB)
downloaded 1.0 MB
package ‘haven’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\bisc048\AppData\Local\Temp\RtmpUx6QYp\downloaded_packages
installing the source packages ‘labelled’, ‘questionr’
trying URL 'https://cran.rstudio.com/src/contrib/labelled_2.7.0.tar.gz'
Content type 'application/x-gzip' length 194703 bytes (190 KB)
downloaded 190 KB
trying URL 'https://cran.rstudio.com/src/contrib/questionr_0.7.2.tar.gz'
Content type 'application/x-gzip' length 1725961 bytes (1.6 MB)
downloaded 1.6 MB
* installing *source* package 'labelled' ...
** Paket 'labelled' erfolgreich entpackt und MD5 Summen überprüft
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]) :
namespace 'haven' 2.2.0 is being loaded, but >= 2.3.1 is required
ERROR: lazy loading failed for package 'labelled'
* removing 'C:/Users/bisc048/Documents/R/win-library/3.5/labelled'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘labelled’ had non-zero exit status
ERROR: dependency 'labelled' is not available for package 'questionr'
* removing 'C:/Users/bisc048/Documents/R/win-library/3.5/questionr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘questionr’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\bisc048\AppData\Local\Temp\RtmpUx6QYp\downloaded_packages’
library(questionr)
Error in library(questionr) : es gibt kein Paket namens ‘questionr’
Upvotes: 1
Views: 6869
Reputation: 5747
It looks like questionr
could not be installed because it depends on labelled
, which failed to install because it depends on haven
version 2.3.1 or higher, which depends on rlang
and vctrs
, which could not be updated because they were in use.
Start a fresh R session with no packages loaded. Use install.packages()
to update rlang
and vctrs
manually. Then update haven
manually. Then, install labbelled
manually. Finally, try to install questionr
again.
If you continue to be unable to update haven
, browse to your library folder and delete the haven
folder and install it fresh.
It also looks like you are still using R 3.5. The current R version is 4.0.2. Updating R may help especially if some of the dependencies that failed to install require newer version of R than you are using.
Upvotes: 1