powered by
Select a subset of variables or records from a SpatVector.
# S4 method for SpatVector subset(x, subset, drop=FALSE, ...)
SpatVector
logical expression indicating elements or rows to keep: missing values are taken as false
logical. If TRUE, the geometries will be dropped, and a data.frame is returned
TRUE
additional arguments. None implemented
SpatVector or, if drop=TRUE, a data.frame.
drop=TRUE
# NOT RUN { f <- system.file("exdata/lux.shp", package="terra") v <- vect(f) v[2:3,] v[,2:3] subset(v, v$NAME_1 == "Diekirch") # }
Run the code above in your browser using DataLab