1

When I try to install tmap:

install.packages("tmap")

I have the following mistake:

also installing the dependencies ‘tmaptools’, ‘sf’


  There are binary versions available but the source versions are later:
     binary source needs_compilation
sf    0.9-0  0.9-2              TRUE
tmap  2.3-2    3.0             FALSE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tmaptools_3.0.zip'
Content type 'application/zip' length 178880 bytes (174 KB)
downloaded 174 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/sf_0.9-0.zip'
Content type 'application/zip' length 39675549 bytes (37.8 MB)
downloaded 37.8 MB

package ‘tmaptools’ successfully unpacked and MD5 sums checked
package ‘sf’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Marine\AppData\Local\Temp\RtmpSQF9EP\downloaded_packages
installing the source package ‘tmap’

trying URL 'https://cran.rstudio.com/src/contrib/tmap_3.0.tar.gz'
Content type 'application/x-gzip' length 2936348 bytes (2.8 MB)
downloaded 2.8 MB

* installing *source* package 'tmap' ...
** package 'tmap' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'sf' 0.9-0 is being loaded, but = 0.9.1 is required
Calls: <Anonymous ... withCallingHandlers - loadNamespace - namespaceImport - loadNamespace
Exécution arrêtée
ERROR: lazy loading failed for package 'tmap'
* removing 'C:/Program Files/R/R-3.6.3/library/tmap'
Warning in install.packages :
  installation of package ‘tmap’ had non-zero exit status

So I guess this is a problem with the sf version, but when I try to install sf independently, it is the version 0.9-0. that I install, and I cannot install 0.9.1 or more as required.

Any tip to overcome this issue?

Thanks!

PS: I use R version 3.6.3

marinetheo
  • 11
  • 2
  • binaries for `sf` 0.9.2 are not yet on CRAN (https://cran.r-project.org/web/packages/sf/index.html) - Since I would not advise installing from source, I'd suggest to just wait a couple of days for the binaires to land on CRAN. – lbusett Apr 15 '20 at 17:55

0 Answers0