quantile_group {GenericML} | R Documentation |
Partitions a vector into quantile groups and returns a logical matrix indicating group membership.
quantile_group(x, cutoffs = c(0.25, 0.5, 0.75))
x |
A numeric vector to be partitioned. |
cutoffs |
A numeric vector denoting the quantile cutoffs for the partition. Default are the quartiles: |
An object of type "quantile_group"
, which is a logical matrix indicating group membership.
set.seed(1)
x <- runif(100)
cutoffs <- c(0.25, 0.5, 0.75)
quantile_group(x, cutoffs)