spcvFoldsPoly: Make spatial partitions (using k-means clustering)

Description Usage Arguments Value

View source: R/randomwalk_spatial_cross_validation.R

Description

Divides a spatial sample of polygons into irregularly shaped spatial partitions using k-means clustring. It uses the spatial coordinates defined by the polygon centroids.

Usage

1
spcvFoldsPoly(x, n_folds = 5, seed_cv = 11082017)

Arguments

x

A SpatialPolygonsDataframe

n_folds

The number of folds (i.e. partitions)

seed_cv

The random seed defined to reproduce results

Value

A vector containing numeric labels defining each fold


jngtz/runout.opt documentation built on Sept. 8, 2021, 2:15 p.m.