R: Create a SpatVectorCollection

svc {terra} | R Documentation

## Create a SpatVectorCollection

### Description

Methods to create a SpatVectorCollection. This is an object to hold "sub-datasets", each a SpatVector, perhaps of different geometry type.

### Usage

    ## S4 method for signature 'missing'
    svc(x, ...)

    ## S4 method for signature 'SpatVector'
    svc(x, ...)

    ## S4 method for signature 'list'
    svc(x, ...)

### Arguments

`x` | SpatVector, or list of SpatVector objects, or missing
`...` | additional arguments. Can be other `SpatVector` objects if `x` is a `SpatVector`

### Value

SpatVectorCollection

### Examples

    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,])

[Package terra version 1.4-7 Index]