Learn R Programming

terra (version 0.4-3)

xmin: Get or set single values of an extent

Description

Get or set single values of an extent. Values can be set for a SpatExtent or SpatRaster, but not for a SpatVector)

Usage

# S4 method for SpatExtent
xmin(x)
# S4 method for SpatExtent
xmax(x)
# S4 method for SpatExtent
ymin(x)
# S4 method for SpatExtent
ymax(x)
# S4 method for SpatRaster
xmin(x)
# S4 method for SpatRaster
xmax(x)
# S4 method for SpatRaster
ymin(x)
# S4 method for SpatRaster
ymax(x)
# S4 method for SpatVector
xmin(x)
# S4 method for SpatVector
xmax(x)
# S4 method for SpatVector
ymin(x)
# S4 method for SpatVector
ymax(x)

xmin(x, ...) <- value xmax(x, ...) <- value ymin(x, ...) <- value ymax(x, ...) <- value

Arguments

x

SpatRaster, SpatExtent, or SpatVector

value

numeric

...

additional arguments. None implemented

Value

SpatExtent or numeric coordinate

Examples

Run this code
# NOT RUN {
r <- rast()
ext(r)
ext(c(0, 20, 0, 20))

xmin(r)
xmin(r) <- 0
xmin(r)
# }

Run the code above in your browser using DataLab