# NOT RUN {
data <- data.frame('values' = 100:1, 'group' = rep(c('A', 'B', NA, 'D'), 25))
calculate_stratified_percentiles(data, 'values', list(group = c('A', 'B', 'D')))
calculate_stratified_percentiles(data, 'values', c('group'), use.na = TRUE)
calculate_stratified_percentiles(data, 'values', list(group = c('A', 'C')), use.na=TRUE)
# The following example will result in NA values caused by NAs in 'group'.
# Therefore, it will return the percentile vector, but issue a warning.
# }
# NOT RUN {
calculate_stratified_percentiles(data, 'values', 'group')
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab