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