Create simple feature list column, set class, and add coordinate reference system
st_sfc(..., crs = NA_crs_, precision = 0)
one or more simple feature geometries
coordinate reference system: integer with the epsg code, or character with proj4string
numeric; see st_as_binary
a simple feature collection object is a list of class c("stc_TYPE", "sfc") which contains objects of identical type. This function creates such an object from a list of simple feature geometries (of class sfg).
c("stc_TYPE", "sfc")
sfg
# NOT RUN { pt1 = st_point(c(0,1)) pt2 = st_point(c(1,1)) (sfc = st_sfc(pt1, pt2)) d = st_sf(data.frame(a=1:2, geom=sfc)) # }
Run the code above in your browser using DataCamp Workspace