make_percentile_tab2d | R Documentation |
Calculate raw values for percentile curve
make_percentile_tab2d(
ref,
item,
perc = c(2.5, 5, 50, 95, 97.5),
stack = F,
age = NULL,
x2 = NULL,
include.pars = T,
digits = 4,
sex
)
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 |
x2 |
desired values of second covariate |
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 |
calculates quantile values for given RefGroup and given percentiles
data frame either with the different percentiles as columns or, if stacked, as data frame with four columns: age, sex, variable, value
Mandy Vogel
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.