spcvFoldsPoly.RdDivides a spatial sample of polygons into irregularly shaped spatial partitions using k-means clustring. It uses the spatial coordinates defined by the polygon centroids.
spcvFoldsPoly(x, n_folds = 5, seed_cv = 11082017)
| x | A SpatialPolygonsDataframe |
|---|---|
| n_folds | The number of folds (i.e. partitions) |
| seed_cv | The random seed defined to reproduce results |
A vector containing numeric labels defining each fold