Error in load in bioclim variables in Tiff file in R.

clim_list <-list.files("G:/SB_Overlap/Bio_new",pattern=".bils$",full.names = T)
> clim = raster::stack("clim_list")
Error in .rasterObjectFromFile(x, objecttype = "RasterBrick", ...) : 
 Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
> install.packages("rgdal")
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/RITAM/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rgdal_1.4-4.zip'
Content type 'application/zip' length 32976878 bytes (31.4 MB)
downloaded 31.4 MB
package ‘rgdal’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
   C:\Users\RITAM\AppData\Local\Temp\Rtmpq8ivkY\downloaded_packages
Error in x[[1]] : subscript out of bounds

As the warning message says you need to install Rtools first.
https://cran.r-project.org/bin/windows/Rtools/

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.