View source: R/calculate_centile_table.R
calculate_centile_table | R Documentation |
This function calculates centiles based on specified z-scores or percentiles
using a given reference. It requires the reference to be provided as a code
compatible with the centile
package.
calculate_centile_table(x, z = NULL, p = NULL, refcode = NULL, dec = 4, ...)
x |
A vector with the grid (usually years, sometimes cm) on the horizontal axis. |
z |
A vector containing the z values of the desired centiles. |
p |
A vector containing the desired percentile values (between 0 and
100). The default |
refcode |
A reference code according to the specifications of the
|
dec |
Number of decimals needed for the output. |
... |
Additional arguments passed down to |
A matrix
containing the desired centiles, with columns named
according to either the z-score values (e.g., Z-2
, Z0
, Z2
) or
percentiles (e.g., P3
, P50
, P97
).
# Centile table from WHO weight standard for boys aged 0-5 years
calculate_centile_table(z = -2:2, x = 0:5, refcode = "who_2006_wgt_male_")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.