make_percentile_tab {childsds} | R Documentation |
calculate raw values
Description
Calculate raw values for percentile curve
Usage
make_percentile_tab(
ref,
item,
perc = c(2.5, 5, 50, 95, 97.5),
stack = F,
age = NULL,
include.pars = T,
digits = 4,
sex
)
Arguments
ref |
Refgroup object |
item |
name of the measurement item |
perc |
vector of percentiles to be calculated |
stack |
wether or not the data should be stacked, stacked data would most possibly be used in ggplot2 |
age |
desired values of age |
include.pars |
indicator whether or not parameters should be included |
digits |
specification of number of decimal places |
sex |
name of the sex variable (character) if different from sex, not functional in this version and therefore ignored |
Details
calculates quantile values for given RefGroup and given percentiles
Value
data frame either with the different percentiles as columns or, if stacked, as data frame with four columns: age, sex, variable, value
Author(s)
Mandy Vogel
Examples
ptab <- make_percentile_tab(ref = kro.ref,
item = "height",
perc = c(2.5,10,50,90,97.5),
stack = TRUE)
ggplot2::ggplot(ptab, ggplot2::aes(x = age, y = value, colour = variable)) +
ggplot2::geom_line() +
ggplot2::facet_wrap(~ sex, nrow = 2)
[Package childsds version 0.8.0 Index]