knitr::opts_chunk$set(collapse = TRUE) if (file.exists("nc1.shp")) file.remove("nc1.shp", "nc1.dbf", "nc1.shx", "nc1.prj")
library("sf") fname <- system.file("shape/nc.shp", package = "sf") nc <- st_read(fname)
st_write(nc, "nc1.shp")
file.exists("nc1.shp")
library("sp") data(meuse) coordinates(meuse) = ~x+y m.sf = st_as_sf(meuse) opar = par(mar=rep(0,4)) plot(m.sf)
library("units") as_units("mm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.