I am trying to upload a bunch of environmental raster layers into R for a SDM. They are all the same extent, pixel size, etc., and most of my layers are uploading fine, but my BIOCLIM layers are not.
I was able to plot each layer and it looked fine, but when I stack them together I get this error:
In .makeRasterList(rlist) : layer(s) with no data ignored
When I look at my stack, only one of my 19 layers is there. I am assuming this error means that some of my pixels have no data, but I don't know how to fix this - any ideas?
edit: I'm not sure if it is a problem in arcmap or R (I believe it may be the former since my other non-climatic layers worked). Here is my code for one of the 19 layers:
ann_mean_temp <- 'ann_mean_temp3.tif'
ann_mean_temp=brick(ann_mean_temp)
plot(ann_mean_temp)
ann_mean_temp
class : RasterBrick
dimensions : 785, 887, 696295, 1 (nrow, ncol, ncell, nlayers)
resolution : 1000, 1000 (x, y)
extent : 936315.5, 1823316, -341835.1, 443164.9 (xmin, xmax, ymin,
ymax)
coord. ref. : +proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0
+y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0
data source : C:\Users\Anna\Documents\ArcGIS\R\ann_mean_temp3.tif
names : ann_mean_temp3
min values : 57
max values : 155
climate <- stack(ann_mean_temp, diurnal_range, Isothermality,
temp_seasonality, max_temp_warmest, min_temp_coldest,
temp_range, temp_wettest, temp_driest,
mean_temp_warmest, mean_temp_coldest, ann_precip,
precip_wettest_m, precip_driest_m, precip_seasonality,
precip_wettest_q, precip_driest_q, precip_warmest,
precip_coldest)
I'm now getting this error: Error in compareRaster(x) : different number or columns
I should also mention that in arcmap all I did was download each layer from BIOCLIM, project it, extract by mask to clip each layer to my study area, and export it as a tif file.