I had previous functioning R code that took an interpolated dataset of class
sf, and turned it into a raster. I then preformed an average of raster values over specific overlayed polygons. It seems that raster is now throwing errors. See the following reprex:
library(sp) library(raster) data("meuse.grid") coordinates(meuse.grid) = ~x+y mraster=raster(meuse.grid)
Note that the summary of meuse.grid (non-raster) appears as:
> meuse.grid class : SpatialPointsDataFrame features : 3103 extent : 178460, 181540, 329620, 333740 (xmin, xmax, ymin, ymax) crs : NA variables : 5 names : part.a, part.b, dist, soil, ffreq min values : 0, 0, 0, 1, 1 max values : 1, 1, 0.992607, 3, 3
while the summary of the raster version of meuse grid appears as:
> mraster class : RasterLayer dimensions : 10, 10, 100 (nrow, ncol, ncell) resolution : 308, 412 (x, y) extent : 178460, 181540, 329620, 333740 (xmin, xmax, ymin, ymax) crs : NA
Am I missing something here? The dimensions of the raster are reduced to 100 cells. In my personal dataset (not shown here), the dataset reduces from 69759 cells to 100 as well. Recent error? Should I post as an issue on the raster github?