Subset of a SpatVector
Select a subset of variables or records from a SpatVector.
## S4 method for signature 'SpatVector' subset(x, subset, drop=FALSE)
x |
SpatVector |
subset |
logical expression indicating elements or rows to keep: missing values are taken as false |
drop |
logical. If |
SpatVector or, if drop=TRUE
, a data.frame.
f <- system.file("ex/lux.shp", package="terra") v <- vect(f) v[2:3,] v[,2:3] subset(v, v$NAME_1 == "Diekirch")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.