as.records {rsat} | R Documentation |
Create records object from data frame
Description
Create records object from data frame
Usage
as.records(x)
## S4 method for signature 'data.frame'
as.records(x)
Arguments
x |
a |
Value
returns a records objects with the columns values in x
Examples
## Not run:
# 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 dataframr
df <- as.data.frame(rcds)
# print the dataframe
print(df)
# coerce the dataframe to records
rcds2 <- as.records(df)
# check the conversion
identical(rcds,rcds2)
## End(Not run)
[Package rsat version 0.1.21 Index]