plot_folds: plot folds

Description Usage Arguments See Also Examples

View source: R/kfold.R

Description

plot_folds makes a rudimentary plot of the data and the folds created with e.g. kfold_disc or kfold.

Usage

1

Arguments

data

Matrix or dataframe. Data for which the folds where created. The first two columns should represent the longitude and latitude (or x,y coordinates).

folds

Numeric vector with group assignments from e.g. kfold_disc, kfold_grid or kfold.

colors

Colors to use for the different folds

...

Arguments to be passed to the plot function.

See Also

kfold_disc, kfold_grid, kfold

Examples

1
2
3
4
set.seed(42)
lonlat_data <- cbind(runif(11, -180, 180), runif(11, -90, 90))
folds <- kfold_disc(lonlat_data, k = 5)
plot_folds(lonlat_data, folds)

lifewatch/marinespeed documentation built on Dec. 19, 2019, 2:59 a.m.