[R-sig-Geo] How to randomly select polygons

Dexter Locke dexter@|ocke @end|ng |rom gm@||@com
Tue Sep 24 00:28:59 CEST 2024


or in a tidy way

nc  <- sf::st_read(system.file("shape/nc.shp", package = "sf"))

nc_10 <- nc |> dplyr::sample_n(10)

-Dexter

> On Sep 23, 2024, at 5:55 PM, Josiah Parry <josiah.parry using gmail.com> wrote:
> 
> nc  <- sf::st_read(system.file("shape/nc.shp", package = "sf"))

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list