Learn R Programming

terra (version 0.5-2)

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

Description

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

Usage

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

Arguments

x

SpatVector

row.names

ignored

optional

ignored

...

additional arguments (none)

Value

data.frame

Examples

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

Run the code above in your browser using DataLab