powered by
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))
A numeric vector to be partitioned.
A numeric vector denoting the quantile cutoffs for the partition. Default are the quartiles: c(0.25, 0.5, 0.75).
c(0.25, 0.5, 0.75)
An object of type "quantile_group", which is a logical matrix indicating group membership.
"quantile_group"
# NOT RUN { set.seed(1) x <- runif(100) cutoffs <- c(0.25, 0.5, 0.75) quantile_group(x, cutoffs) # }
Run the code above in your browser using DataLab