head(x, ...)
tail(x, ...)
rows=10
and cols=20
, to set the maximum number of rows and columns that is shown. For RasterStack and RasterBrick objects there is an additional argument lyrs
getValuesBlock
r <- raster(nrow=25, ncol=25)
r[] = 1:ncell(r)
head(r)
tail(r, cols=10, rows=5)
Run the code above in your browser using DataLab