[R-sig-Geo] Building a vector of random sf st_points
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Wed Dec 21 17:25:19 CET 2016
Hi,
Very new to spatial R. I'm trying to find the best way to build a sf dataframe of random points inside an extent. I built a matrix of random coordinates and now I try to convert this matrix to a vector of st_point.
I was expecting that something like:
PTS <- matrix(seq(1,6), 3, 2)
ptsdf <- apply(PTS, 1, st_point)
would work but it doesn't. Why?
Thanks,
Pierre
More information about the R-sig-Geo
mailing list