Learn R Programming

raster (version 3.6-30)

head: Show the head or tail of a Raster* object

Description

Show the head (first rows/columns) or tail (last rows/columns) of the cell values of a Raster* object.

Usage

head(x, ...) 
tail(x, ...)

Value

matrix

Arguments

x

Raster* object

...

Additional arguments: rows=10 and cols=20, to set the maximum number of rows and columns that are shown. For RasterStack and RasterBrick objects there is an additional argument lyrs

See Also

getValuesBlock

Examples

Run this code
r <- raster(nrow=25, ncol=25)
values(r) = 1:ncell(r)
head(r)
tail(r, cols=10, rows=5)

Run the code above in your browser using DataLab