I am trying to install leaflet but it is not installing. I have a windows operating system and the error code is below.
install.packages("leaflet")
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/Michael/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘raster’ is not available
There is a binary version available but the source version is
later:
binary source needs_compilation
leaflet 2.0.2 2.0.3 FALSE
installing the source package ‘leaflet’
trying URL 'https://cran.rstudio.com/src/contrib/leaflet_2.0.3.tar.gz'
Content type 'application/x-gzip' length 2039454 bytes (1.9 MB)
downloaded 1.9 MB
ERROR: dependency 'raster' is not available for package 'leaflet'
- removing 'C:/Users/Michael/Documents/R/win-library/3.4/leaflet'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Michael\Documents\R\win-library\3.4" C:\Users\Public\Documents\Wondershare\CreatorTemp\RtmpasHzjz/downloaded_packages/leaflet_2.0.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘leaflet’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Public\Documents\Wondershare\CreatorTemp\RtmpasHzjz\downloaded_packages’