Methods to create a SpatVectorCollection. This is an object to hold "sub-datasets", each a SpatVector, perhaps of different geometry type.
# S4 method for missing
svc(x) # S4 method for SpatVector
svc(x, ...)
# S4 method for list
svc(x)
SpatVectorCollection
SpatVector, or list of a SpatVector, or missing
Additional SpatVector
s
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
x <- svc()
x <- svc(v, v[1:3,], as.lines(v[3:5,]), as.points(v))
length(x)
x
# extract
x[3]
# replace
x[2] <- as.lines(v[1,])
Run the code above in your browser using DataLab