apply_subsampling: Internal function for subsampling

View source: R/tools.R

apply_subsamplingR Documentation

Internal function for subsampling

Description

if subsample = FALSE do nothing.

Usage

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

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.

Value

a data.frame


segclust2d documentation built on May 29, 2024, 6:41 a.m.