demo/meuse_sf.R

data(meuse, package = "sp") # load data.frame from sp
library(sf)
meuse_sf = st_as_sf(meuse, coords = c("x", "y"), crs = 28992)
meuse_sf[1:5,]
summary(meuse_sf[1:5,])

Try the sf package in your browser

Any scripts or data that you put into this service are public.

sf documentation built on July 26, 2021, 5:07 p.m.