values
is a shorthand version of getValues.getValues(x, row, nrows, ...)
values(x, ...)
RasterLayer
:
format
Character. specifiy the output format. Either "" or "matrix". The default is "", in which case a vector is returned.
The values returned for a RasterStack or RasterBrick are always a matrix, with the rows representing cells, and the columns representing layers.r <- raster(system.file("external/test.grd", package="raster"))
getValues(r)
getValues(r, row=10)
Run the code above in your browser using DataLab