if subsample = FALSE do nothing.

apply_subsampling(x, is_segclust, subsample, subsample_over, subsample_by)

Arguments

x

data.frame to be subsampled

is_segclust

TRUE or FALSE whether the function was called from `segclust()` or `segmentation()`

subsample

if FALSE disable subsampling

subsample_over

maximum number of row accepted

subsample_by

subsampling parameters

Value

a data.frame

Details

else if subsample_by is missing, subsample only if nrow(x) > subsample_over, then it subsample with the minimum needed to get a data.frame smaller than subsample_over

if subsample_by is provided, use it to subsample.