Description Usage Arguments Examples
Check a dataset to ensure it will be compatible with hbgd methods
1 | check_data(dat, has_height = TRUE, has_weight = TRUE, has_hcir = TRUE)
|
dat |
a data frame |
has_height |
does this dataset contain anthropometric height data? |
has_weight |
does this dataset contain anthropometric weight data? |
has_hcir |
does this dataset contain anthropometric head circumference data? |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(growthstandards)
check_data(cpp, has_hcir = FALSE)
smc <- brokenstick::smocc.hgtwgt
check_data(smc, has_hcir = FALSE)
names(smc)[2] <- "subjid"
names(smc)[5] <- "agedays"
smc$sex <- as.character(smc$sex)
smc$sex[smc$sex == "male"] <- "Male"
smc$sex[smc$sex == "female"] <- "Female"
names(smc)[10] <- "htcm"
names(smc)[11] <- "wtkg"
check_data(smc, has_hcir = FALSE)
names(smc)[12] <- "haz"
smc$waz <- who_wtkg2zscore(smc$agedays, smc$wtkg, smc$sex)
smc$agedays <- smc$agedays * 365.25
check_data(smc, has_hcir = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.