Learn R Programming

c14bazAAR (version 1.2.0)

as.sf: Convert a c14_date_list to a sf object

Description

Most 14C dates have point position information in the coordinates columns lat and lon. This allows them to be converted to a spatial simple feature collection as provided by the sf package. This simplifies for example mapping of the dates.

Usage

as.sf(x, quiet = FALSE)

# S3 method for default as.sf(x, quiet = FALSE)

# S3 method for c14_date_list as.sf(x, quiet = FALSE)

Arguments

x

an object of class c14_date_list

quiet

suppress warning about the removal of dates without coordinates

Value

an object of class sf

Examples

Run this code
# NOT RUN {
sf_c14 <- as.sf(example_c14_date_list)

# }
# NOT RUN {
library(mapview)
mapview(sf_c14$geom)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab