Learn R Programming

rsat (version 0.1.21)

as.data.frame,extent_crs-method: Coerce to a Data Frame

Description

Functions to check if an object is a data frame, or coerce it if possible.

Usage

# S4 method for extent_crs
as.data.frame(x)

# S4 method for records as.data.frame(x)

Value

returns a data frame, normally with all row names

Arguments

x

Any R object.

Examples

Run this code
if (FALSE) {
# load example rtoi
file.copy(from=system.file("ex/Navarre",package="rsat"),
         to=tempdir(),
         recursive = TRUE)

navarre <- read_rtoi(file.path(tempdir(),"Navarre"))

# get the records
rcds <- records(navarre)
# coerce the records to rtoi
df <- as.data.frame(rcds)
# print the dataframe
print(df)
}

Run the code above in your browser using DataLab