Unable to install tmap - r

Tried to install the tmap package but encounter the below error
install.packages("tmap")
also installing the dependencies ‘tmaptools’, ‘sf’, ‘stars’, ‘classInt’
There are binary versions available but the source versions are later:
binary source needs_compilation
tmaptools 2.0-2 3.1 FALSE
sf 0.8-1 0.9-5 TRUE
stars 0.4-0 0.4-3 FALSE
classInt 0.4-2 0.4-3 TRUE
tmap 2.3-2 3.1 FALSE
Do you want to install from sources the packages which need compilation? (Yes/no/cancel) no
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/sf_0.8-1.tgz'
Content type 'application/x-gzip' length 53770407 bytes (51.3 MB)
==================================================
downloaded 51.3 MB
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/classInt_0.4-2.tgz'
Content type 'application/x-gzip' length 77560 bytes (75 KB)
==================================================
downloaded 75 KB
The downloaded binary packages are in
/var/folders/60/16nrd6w13g33nq3dpr441mgc0000gn/T//RtmphtcoT4/downloaded_packages
installing the source packages ‘tmaptools’, ‘stars’, ‘tmap’
trying URL 'https://cran.rstudio.com/src/contrib/tmaptools_3.1.tar.gz'
Content type 'application/x-gzip' length 39932 bytes (38 KB)
==================================================
downloaded 38 KB
trying URL 'https://cran.rstudio.com/src/contrib/stars_0.4-3.tar.gz'
Content type 'application/x-gzip' length 4745035 bytes (4.5 MB)
==================================================
downloaded 4.5 MB
trying URL 'https://cran.rstudio.com/src/contrib/tmap_3.1.tar.gz'
Content type 'application/x-gzip' length 2948495 bytes (2.8 MB)
==================================================
downloaded 2.8 MB
* installing *source* package ‘stars’ ...
** package ‘stars’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error : package ‘sf’ 0.8.1 was found, but >= 0.9.0 is required by ‘stars’
ERROR: lazy loading failed for package ‘stars’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/stars’
Warning in install.packages :
installation of package ‘stars’ had non-zero exit status
ERROR: dependency ‘stars’ is not available for package ‘tmaptools’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tmaptools’
Warning in install.packages :
installation of package ‘tmaptools’ had non-zero exit status
ERROR: dependencies ‘tmaptools’, ‘stars’ are not available for package ‘tmap’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tmap’
Warning in install.packages :
installation of package ‘tmap’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/60/16nrd6w13g33nq3dpr441mgc0000gn/T/RtmphtcoT4/downloaded_packages’

Issue solved by reinstalled R to the latest version

Related

Error when installing "Diffbind" package in R

I was trying to install DiffBind package in R, but it reports to me some errors. Could anyone explain to me how to fix errors and installing properly it?
That's the message:
BiocManager::install("DiffBind")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cloud.r-project.org
Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.3 (2022-03-10)
Installing package(s) 'DiffBind'
si installano anche le dipendenze ‘RcppEigen’, ‘RcppNumerical’, ‘apeglm’
apertura URL 'https://cloud.r-project.org/src/contrib/RcppEigen_0.3.3.9.2.tar.gz'
Content type 'application/x-gzip' length 1476004 bytes (1.4 MB)
==================================================
downloaded 1.4 MB
apertura URL 'https://cloud.r-project.org/src/contrib/RcppNumerical_0.4-0.tar.gz'
Content type 'application/x-gzip' length 143327 bytes (139 KB)
==================================================
downloaded 139 KB
apertura URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/apeglm_1.16.0.tar.gz'
Content type 'application/x-gzip' length 1092965 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
apertura URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/DiffBind_3.4.11.tar.gz'
Content type 'application/x-gzip' length 6762432 bytes (6.4 MB)
==================================================
downloaded 6.4 MB
ERROR: failed to lock directory ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1’ for modifying
Try removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-RcppEigen’
ERROR: dependency ‘RcppEigen’ is not available for package ‘RcppNumerical’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/RcppNumerical’
ERROR: dependencies ‘RcppEigen’, ‘RcppNumerical’ are not available for package ‘apeglm’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/apeglm’
ERROR: dependency ‘apeglm’ is not available for package ‘DiffBind’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/DiffBind’
The downloaded source packages are in
‘/tmp/RtmpOMlR7W/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
spatial, survival
Messaggi di avvertimento:
1: In .inet_warning(msg) :
installation of package ‘RcppEigen’ had non-zero exit status
2: In .inet_warning(msg) :
installation of package ‘RcppNumerical’ had non-zero exit status
3: In .inet_warning(msg) :
installation of package ‘apeglm’ had non-zero exit status
4: In .inet_warning(msg) :
installation of package ‘DiffBind’ had non-zero exit status
I was also trying to install apeglm, RcppNumerical and RcppEpigen but it returns to me with the same error message of failure installation.
Thank you,
Regards

Problems with installing package haven

I'm trying to install the package haven, but when opening it in the library it is said: there is no package "hms". So I've tryed to install the packing "hms". But it gives me this error messages:
> install.packages("hms", dependencies = TRUE)
Installing package into ‘C:/Users/Merete/OneDrive - uni-muenster.de/Dokumente/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ellipsis’, ‘rlang’, ‘vctrs’
There are binary versions available but the source versions are later:
binary source needs_compilation
ellipsis 0.1.0 0.3.0 TRUE
rlang 0.3.4 0.4.6 TRUE
vctrs 0.1.0 0.3.0 TRUE
hms 0.4.2 0.5.3 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ellipsis_0.1.0.zip'
Content type 'application/zip' length 30847 bytes (30 KB)
downloaded 30 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/vctrs_0.1.0.zip'
Content type 'application/zip' length 499748 bytes (488 KB)
downloaded 488 KB
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘rlang’
package ‘vctrs’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Merete\AppData\Local\Temp\RtmpakYjr4\downloaded_packages
installing the source package ‘hms’
trying URL 'https://cran.rstudio.com/src/contrib/hms_0.5.3.tar.gz'
Content type 'application/x-gzip' length 134669 bytes (131 KB)
downloaded 131 KB
ERROR: dependency 'rlang' is not available for package 'hms'
* removing 'C:/Users/Merete/OneDrive - uni-muenster.de/Dokumente/R/win-library/3.4/hms'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Merete\OneDrive - uni-muenster.de\Dokumente\R\win-library\3.4" C:\Users\Merete\AppData\Local\Temp\RtmpakYjr4/downloaded_packages/hms_0.5.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Merete\AppData\Local\Temp\RtmpakYjr4\downloaded_packages’
> library(hms)
Error in library(hms) : es gibt kein Paket namens ‘hms’ (there is no package "hms)
>
I am new to R, so there might be an easy answer to this, but on my own I was not able to solve the problem.

RMD packages can't be downloaded in R Studio

I can't download the RMD packages in R studio. I tried it by running install.packages("rmarkdown"), and I tried it by File > New File > R Markdown > Download packages.
This is the output:
> install.packages("rmarkdown")
Installing package into ‘C:/Users/Luke/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘glue’, ‘stringi’, ‘knitr’, ‘yaml’, ‘stringr’
There are binary versions available but the source versions are later:
binary source needs_compilation
glue 1.0.0 1.3.1 TRUE
stringi 1.1.5 1.4.3 TRUE
knitr 1.15.1 1.23 FALSE
yaml 2.1.14 2.2.0 TRUE
stringr 1.2.0 1.4.0 FALSE
rmarkdown 1.4 1.13 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/glue_1.0.0.zip'
Content type 'application/zip' length 34947 bytes (34 KB)
downloaded 34 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/stringi_1.1.5.zip'
Content type 'application/zip' length 14220135 bytes (13.6 MB)
downloaded 13.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/yaml_2.1.14.zip'
Content type 'application/zip' length 180051 bytes (175 KB)
downloaded 175 KB
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘yaml’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages
installing the source packages ‘knitr’, ‘stringr’, ‘rmarkdown’
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.23.tar.gz'
Content type 'application/x-gzip' length 880134 bytes (859 KB)
downloaded 859 KB
trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.4.0.tar.gz'
Content type 'application/x-gzip' length 135777 bytes (132 KB)
downloaded 132 KB
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.13.tar.gz'
Content type 'application/x-gzip' length 3155180 bytes (3.0 MB)
downloaded 3.0 MB
* installing *source* package 'stringr' ...
** package 'stringr' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'stringi' 1.1.5 is being loaded, but >= 1.1.7 is required
ERROR: lazy loading failed for package 'stringr'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/stringr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/stringr_1.4.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘stringr’ had non-zero exit status
ERROR: dependency 'stringr' is not available for package 'knitr'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/knitr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/knitr_1.23.tar.gz' had status 1
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
ERROR: dependencies 'knitr', 'stringr' are not available for package 'rmarkdown'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/rmarkdown'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/rmarkdown_1.13.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages’
The C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages folder contains:
Screenshot of named folder
I am very inexperienced with programming in R, so I have no idea what to do with this. I am learning to do it (via the online Udacity course), and for that I need these RMD packages to continue. I hope someone can help me.

error in install.package("phia")

I am running macOS High Sierra: 10.13.3 and RStudio: 1.1.383
I am trying to install the package "phia" to use the interactionMeans
I have tried changing my mirror to no avail
However, I get this error;
> install.packages("phia", repos="http://cran.r-project.org",
dependencies = T)
also installing the dependencies ‘rio’, ‘car’
There are binary versions available but the source versions are
later:
binary source needs_compilation
rio 0.5.5 0.5.10 FALSE
car 2.1-6 3.0-0 FALSE
trying URL 'http://cran.r-
project.org/bin/macosx/mavericks/contrib/3.3/phia_0.2-1.tgz'
Content type 'application/x-gzip' length 570570 bytes (557 KB)
==================================================
downloaded 557 KB
The downloaded binary packages are in /var/fo
lders/73/gmd2dyv53bq9z861m7x1v09h0000gn/T//Rtmp23hrdR/downloaded_pa
ckages
installing the source packages ‘rio’, ‘car’
trying URL 'http://cran.r-project.org/src/contrib/rio_0.5.10.tar.gz'
Content type 'application/x-gzip' length 70117 bytes (68 KB)
==================================================
downloaded 68 KB
trying URL 'http://cran.r-project.org/src/contrib/car_3.0-0.tar.gz'
Content type 'application/x-gzip' length 443887 bytes (433 KB)
==================================================
downloaded 433 KB
* installing *source* package ‘rio’ ...
** package ‘rio’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error : object ‘read_xls’ is not exported by 'namespace:readxl'
ERROR: lazy loading failed for package ‘rio’
* removing
‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rio’
Warning in install.packages :
installation of package ‘rio’ had non-zero exit status
ERROR: dependency ‘rio’ is not available for package ‘car’
* removing
‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/73/gmd2dyv53bq9z861m7x1v09h0000gn/T/Rtmp23hrdR/downloaded_packages’
If anyone has any ideas please fire them at me!

car package in Ubuntu machine 16.04

I can't install car package in R in an Ubuntu VM 16.04.
My last attempt was through terminal console of R.
The same result when I try to run it through R studio or using devtools
I receive the following errors:
> install.packages('car')
Installing package into ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
also installing the dependencies ‘nloptr’, ‘lme4’, ‘pbkrtest’
trying URL 'https://ftp.cc.uoc.gr/mirrors/CRAN/src/contrib/nloptr_1.0.4.tar.gz'
Content type 'application/octet-stream' length 353957 bytes (345 KB)
==================================================
downloaded 345 KB
trying URL 'https://ftp.cc.uoc.gr/mirrors/CRAN/src/contrib/lme4_1.1-15.tar.gz'
Content type 'application/octet-stream' length 3610706 bytes (3.4 MB)
==================================================
downloaded 3.4 MB
trying URL 'https://ftp.cc.uoc.gr/mirrors/CRAN/src/contrib/pbkrtest_0.4-7.tar.gz'
Content type 'application/octet-stream' length 156406 bytes (152 KB)
==================================================
downloaded 152 KB
trying URL 'https://ftp.cc.uoc.gr/mirrors/CRAN/src/contrib/car_2.1-6.tar.gz'
Content type 'application/octet-stream' length 627349 bytes (612 KB)
==================================================
downloaded 612 KB
ERROR: failed to lock directory ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2’ for modifying
Try removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/00LOCK-nloptr’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/lme4’
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/pbkrtest’
ERROR: dependency ‘pbkrtest’ is not available for package ‘car’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/car’
The downloaded source packages are in
‘/tmp/RtmpXR2ZjI/downloaded_packages’
Warning messages:
1: In install.packages("car") :
installation of package ‘nloptr’ had non-zero exit status
2: In install.packages("car") :
installation of package ‘lme4’ had non-zero exit status
3: In install.packages("car") :
installation of package ‘pbkrtest’ had non-zero exit status
4: In install.packages("car") :
installation of package ‘car’ had non-zero exit status

Resources