## convert girls' heights data to UK 90 z-scores
data(heights)
data(uk90)
lms2z(age, height, sex = 2, heights, measure = 'ht', ref = 'uk90')
## construct table of boys weight centiles for WHO standard on 3-month age grid
data(who06)
zs <- -4:4*2/3 # z-scores for centiles
ages <- 0:12/4 # 3-month ages
v <- as.data.frame(lapply(as.list(zs), function(z) {
v <- lms2z(ages, z, sex = 1, measure = 'wt', ref = 'who06', toz = FALSE)
}))
names(v) <- z2cent(zs)
rownames(v) <- ages
round(v, 2)
Run the code above in your browser using DataLab