Learn R Programming

terra (version 1.7-83)

headtail: head and tail of a SpatRaster or SpatVector

Description

Show the head (first values) or tail (last values) of a SpatRaster or of the attributes of a SpatVector.

Usage

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

Value

matrix (SpatRaster) or data.frame (SpatVector)

Arguments

x

SpatRaster or SpatVector

...

additional arguments passed on to other methods

See Also

show, geom

Examples

Run this code
r <- rast(nrows=25, ncols=25)
values(r) <- 1:ncell(r)
head(r)
tail(r)

Run the code above in your browser using DataLab