#Type: # (1) wac36 = Weight-for-age charts, birth to 36 months # (2) lac36 = Length-for-age charts, birth to 36 months # (3) wlc = Weight-for-recumbent length charts, birth to 36 months # (4) hac = Head circumference-for-age charts, birth to 36 months # (5) wsc = Weight-for-stature charts # (6) wac20 = Weight-for-age charts, 2 to 20 years # (7) lac20 = Stature-for-age charts, 2 to 20 years # (8) bac = BMI-for-age charts, 2 to 20 years # # growthFun <- function( sex=c("m", "f"), type=c("wac36", "lac36", "wlc", "hac", "wsc", "wac20", "lac20", "bac"), path="./Growth/" ){ if( sex == "m" ) { switch(type, "wac36" = source(paste(path, "grafici1m.R", sep="")), "lac36" = source(paste(path, "grafici2m.R", sep="")), "wlc" = source(paste(path, "grafici3m.R", sep="")), "hac" = source(paste(path, "grafici4m.R", sep="")), "wsc" = source(paste(path, "grafici5m.R", sep="")), "wac20" = source(paste(path, "grafici6m.R", sep="")), "lac20" = source(paste(path, "grafici7m.R", sep="")), "bac" = source(paste(path, "grafici8m.R", sep="")) ) } if( sex == "f" ) { switch(type, "wac36" = source(paste(path, "grafici1f.R", sep="")), "lac36" = source(paste(path, "grafici2f.R", sep="")), "wlc" = source(paste(path, "grafici3f.R", sep="")), "hac" = source(paste(path, "grafici4f.R", sep="")), "wsc" = source(paste(path, "grafici5f.R", sep="")), "wac20" = source(paste(path, "grafici6f.R", sep="")), "lac20" = source(paste(path, "grafici7f.R", sep="")), "bac" = source(paste(path, "grafici8f.R", sep="")) ) } }