HEI2020_NHANES_MPED
HEI2020_NHANES_MPED.Rd
Calculate the HEI2020 for the NHANES_MPED data (1999-2004) within 1 step for day 1, day 2, or day 1 and 2 combined, including HEI2020 and HEI-Toddlers-2020
Usage
HEI2020_NHANES_MPED(
MPED_PER_100_GRAM_PATH = NULL,
WJFRT = NULL,
NUTRIENT_PATH = NULL,
NUTRIENT_IND_PATH = NULL,
DEMO_PATH,
NUTRIENT_PATH2 = NULL,
NUTRIENT_IND_PATH2 = NULL
)
Arguments
- MPED_PER_100_GRAM_PATH
The file path for the MPED per 100 gram data for the day 1 and day 2 data. The file name should be like: pyr_tot_d1.sas7bdat
- WJFRT
The file path for the WJFRT data for the day 1 and day2 data. The file name should be like: wjfrt.sas7bdat
- NUTRIENT_PATH
The file path for the NUTRIENT data for the day 1 data. The file name should be like: DR1TOT_J.XPT or DRXTOT_B.XPT
- NUTRIENT_IND_PATH
The file path for the NUTRIENT_IND data for the day 1 data. The file name should be like: DR1IFF_J.XPT
- DEMO_PATH
The file path for the DEMOGRAPHIC data. The file name should be like: DEMO_J.XPT
- NUTRIENT_PATH2
The file path for the NUTRIENT2 data for the day 2 data. The file name should be like: DR2TOT_J.XPT
- NUTRIENT_IND_PATH2
The file path for the NUTRIENT_IND2 data for the day 2 data The file name should be like: DR2IFF_J.XPT
Examples
data("NHANES_20032004")
HEI2020_NHANES_MPED(MPED_PER_100_GRAM_PATH = NHANES_20032004$MPED_PER_100_GRAM, WJFRT = NHANES_20032004$WJFRT, NUTRIENT_PATH = NHANES_20032004$NUTRIENT, NUTRIENT_IND_PATH = NHANES_20032004$NUTRIENT_IND, DEMO_PATH = NHANES_20032004$DEMO, NUTRIENT_PATH2 = NHANES_20032004$NUTRIENT2, NUTRIENT_IND_PATH2 = NHANES_20032004$NUTRIENT_IND2)
#> # A tibble: 7,918 × 17
#> SEQN TOTALKCAL_HEI2020 RIDAGEYR HEI2020_ALL HEI2020_TOTALFRT HEI2020_FRT
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 21005 2598. 19 39.0 0.489 0
#> 2 21006 1198 16 37.8 0.738 0
#> 3 21007 943 14 43.0 3.97 1.03
#> 4 21008 2236. 17 28.4 0 0
#> 5 21009 4540. 55 43.4 0.182 0.311
#> 6 21010 1834. 52 53.7 0.406 0.812
#> 7 21012 2786 63 37.5 0 0
#> 8 21013 1420. 13 44.6 2.44 2.5
#> 9 21014 2079 3 49.0 2.5 0.880
#> 10 21015 1638. 83 66.8 3.37 4.87
#> # ℹ 7,908 more rows
#> # ℹ 11 more variables: HEI2020_VEG <dbl>, HEI2020_GREENNBEAN <dbl>,
#> # HEI2020_TOTALPRO <dbl>, HEI2020_SEAPLANTPRO <dbl>,
#> # HEI2020_WHOLEGRAIN <dbl>, HEI2020_DAIRY <dbl>, HEI2020_FATTYACID <dbl>,
#> # HEI2020_REFINEDGRAIN <dbl>, HEI2020_SODIUM <dbl>, HEI2020_ADDEDSUGAR <dbl>,
#> # HEI2020_SATFAT <dbl>