Learn R Programming

terra (version 0.8-5)

as.data.frame: Get the attributes of a SpatVector

Description

Get a data.frame or list with the attribute values of a SpatVector

Usage

# S4 method for SpatVector
as.data.frame(x, row.names=NULL, optional=FALSE, ...)

# S4 method for SpatVector as.list(x, ...)

Arguments

x

SpatVector

row.names

ignored

optional

ignored

...

additional arguments (none)

Value

data.frame

Examples

Run this code
# NOT RUN {
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
as.data.frame(v)
as.list(v)
# }

Run the code above in your browser using DataLab