histnd: Multidimensional Stratification

Description Usage Arguments Value Note

View source: R/balanced_sampling.R

Description

Calculate strata along multiple variables

Usage

1
histnd(df, quants = c(0, 0.05, 0.2, 0.8, 0.95, 1))

Arguments

df

A dataframe with continuous variables

quants

Quantiles to use as breakpoints in stratification

Value

A vector of length nrow(df) with a unique value for each stratum

Note

for the time being strata are cut for each variable at the quantiles. Default quantiles are c(0,0.075,0.30,0.70,0.925,1) #http://stackoverflow.com/questions/32614736/multidimensional-histogram-with-r


pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.