as | R Documentation |
as()
SoilProfileCollections can be coerced to other R object types using as(spc, 'type')
.
Possible endpoints include: list
, data.frame
, SpatialPointsDataFrame
and SpatialPoints
.
list
data.frame
tbl_df
data.table
SpatialPointsDataFrame
SpatialPoints
# load example data stored as SoilProfileCollection data(sp5) # sp5 str(sp5) # list output str(as(sp5, 'list')) # data.frame output str(as(sp5, 'data.frame')) # Spatial Objects # make some random coordinate data for each profile sp5$x <- sp5$y <- rnorm(length(sp5)) coordinates(sp5) <- ~ x + y # SpatialPointsDataFrame output str(as(sp5, 'SpatialPointsDataFrame')) # SpatialPoints output str(as(sp5, 'SpatialPoints'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.