attach_HEI: Calculate Healthy Eating Index

Description Usage Arguments Value

View source: R/attach_HEI.R

Description

Calculate Healthy Eating Index

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
attach_HEI(
  data,
  years,
  version = c("2015", "2010"),
  method = c("ssum", "pratio"),
  dietary = c("tot", "iff"),
  day = 1,
  varLabel = FALSE,
  energy = TRUE,
  component = TRUE,
  density = FALSE,
  seed = NULL
)

Arguments

data

data to be attached

years

years

version

2015 or 2010

method

ssum or pratio. ssum: simple sum, pratio: population ratio

dietary

tot or iff

day

1 or 2 for per day, 1 and 2 for per person

varLabel

(for ssum) logical. whether to add variable label to HEI data

energy

(for ssum) logical. whether to keep energy column

component

(for ssum) logical. whether to keep component columns

density

(for ssum) logical. whether to keep density columns

seed

(for pratio) seed

Value

Healthy Eating Index


yikeshu0611/nhanesR documentation built on Jan. 29, 2022, 6:08 a.m.