individualAN-class: An S4 class to represent individual anthropometric data

Description Slots Author(s) See Also Examples

Description

The individualAN class stores anthropometric measures as the collection of xyz-class for height, weight, head circumference, bmi, and weight for height.

Slots

hgt

Length/height in cm (xyz)

wgt

Weight in kg (xyz)

hdc

Head circumference in cm (xyz)

wfh

Weight for height kg/m (xyz)

bmi

Body mass index kg/m**2 (xyz)

dsc

D-score (D) (xyz)

Author(s)

Stef van Buuren 2016-2020

See Also

xyz-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# create object with height and weight measures
# do not calculate Z-scores since reference is undefined (no sex)
z <- new("individualAN",
     hgt = new("xyz", yname = "hgt", x = c(0, 0.5), y = c(50, 70), verbose = TRUE),
     wgt = new("xyz", yname = "wgt", x = c(0, 0.3), y = c(3, 6), verbose = TRUE))
data.frame(z)

# specify sex, and we get a reference
z <- new("individualAN",
     hgt = new("xyz", yname = "hgt", x = c(0, 0.5), y = c(50, 70), sex = "male"),
     wgt = new("xyz", yname = "wgt", x = c(0, 0.3), y = c(3, 6), sex = "male"))
data.frame(z)

# calculate -2 and +2 centiles for height and head circumference
# using the WHO Child Growth Standard for girls
hgtref <- "who_2006_hgt_female_"
hdcref <- "who_2007_hdc_female_"
z <- new("individualAN",
     hgt = new("xyz", yname = "hgt", x = c(0, 0, 0.25, 0.25),
       z = c(-2, 2, -2, 2), refcode = hgtref, pkg = "centile"),
     hdc = new("xyz", yname = "wgt", x = c(0, 0, 0.25, 0.25),
       z = c(-2, 2, -2, 2), refcode = hdcref, pkg = "centile"))
data.frame(z)

stefvanbuuren/minihealth documentation built on March 11, 2021, 7:10 p.m.