Description Usage Arguments See Also Examples
plot_folds
makes a rudimentary plot of the data and the folds created
with e.g. kfold_disc
or kfold
.
1 | plot_folds(data, folds, colors, ...)
|
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.
|
colors |
Colors to use for the different folds |
... |
Arguments to be passed to the plot function. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.