make_percentile_tab: calculate raw values

Description Usage Arguments Details Value Author(s) Examples

Description

Calculate raw values for percentile curve

Usage

1
2
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

1
2
3
4
5
6
7
8
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)

mvogel78/childsds documentation built on May 23, 2019, 10:55 a.m.