Last chance! 50% off unlimited learning
Sale ends in
values=TRUE
has values that are the cell numbers of the original raster.rasterFromCells(x, cells, values=TRUE)
TRUE
, the new RasterLayer has cell values that correspond to the cell numbers of x
rowFromCell
r <- raster(ncols=100, nrows=100)
cells <- c(3:5, 210)
r <- rasterFromCells(r, cells)
cbind(1:ncell(r), getValues(r))
Run the code above in your browser using DataLab