library(magrittr)
library(dplyr)
library(tibble)
library(rlang)
library(stats)
library(tidyr)
# Calculate the Total Fruit component score from the 2017-18 NHANES data
# using the 'Simple' method.
score(scoringMethod = "Simple",
years = "1718",
heiComponent = "Total Fruit",
demographicGroup = NULL)
# Calculate the total HEI score by sex using the population ratio method for
# White and Black individuals between ages 5 and 10 with a family income
# between 5000abd 15000 in the 2011-12 NHANES cycle.
score(scoringMethod = "Pop Ratio",
years = "1112",
heiComponent = "Total Score",
demographicGroup = "Sex",
raceEthnicity = c("White", "Black"),
age = c(5,10),
familyIncome = c("[5000, 10000)", "[10000, 15000)"))
Run the code above in your browser using DataLab