Learn R Programming

sperrorest (version 3.0.5)

plot.represampling: Plot spatial resampling objects

Description

plot.represampling displays the partitions or samples corresponding arising from the resampling of a data set.

Usage

# S3 method for represampling
plot(x, data, coords = c("x", "y"), pch = "+", wiggle_sd = 0, ...)

# S3 method for resampling plot(x, ...)

Arguments

x

a represampling resp. resampling object.

data

a data.frame of samples containing at least the x and y coordinates of samples as specified by coords.

coords

vector of length 2 defining the variables in data that contain the x and y coordinates of sample locations.

pch

point symbol (to be passed to points).

wiggle_sd

'wiggle' the point locations in x and y direction to avoid overplotting of samples drawn multiple times by bootstrap methods; this is a standard deviation (in the units of the x/y coordinates) of a normal distribution and defaults to 0 (no wiggling).

...

additional arguments to plot.

Examples

Run this code
data(ecuador)
# non-spatial cross-validation:
resamp <- partition_cv(ecuador, nfold = 5, repetition = 1:2)
# plot(resamp, ecuador)
# spatial cross-validation using k-means clustering:
resamp <- partition_kmeans(ecuador, nfold = 5, repetition = 1:2)
# plot(resamp, ecuador)

Run the code above in your browser using DataLab