Learn R Programming

terra (version 1.8-5)

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)

# S4 method for SpatRaster,numeric xmin(x)<-value

# S4 method for SpatRaster,numeric xmax(x)<-value

# S4 method for SpatRaster,numeric ymin(x)<-value

# S4 method for SpatRaster,numeric ymax(x)<-value

Value

SpatExtent or numeric coordinate

Arguments

x

SpatRaster, SpatExtent, or SpatVector

value

numeric

Examples

Run this code
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