diet.diary.pools: diet.diary.pools

Description Usage Arguments Details Value Note Author(s) See Also

View source: R/ShedsHT.R

Description

Assigns activity diaries from the Diet_diaries input on the Run file (read through the read.run.file function) to pools based on age and gender.

Usage

1
diet.diary.pools(diaries, specs)

Arguments

specs

Output of the read.run.file function, which can be modified by the update.specs function before input into diet.diary.pools.

diet.diaries

A data set created internally in SHEDS.HT through the read.diet.diaries function. The data are daily diaries of dietary consumption by food group. Each line represents one person-day, with demographic variables followed by amounts (in grams/day) for a list of food types indicated by a short abbreviation on the header line.

Details

The diet.diary.pools function assigns the dietary diaries to pools. A given diary may belong to many pools, since every year of age has its own pool. Large pools may contain a list of several hundred diary numbers. The code contains four loops and on each step performs a sub-setting of the list of diary numbers.

Value

dpool A vector of lists. The length of dpool is the product of the gender and age inputs specified in the Run file. Each element is a list of acceptable diet diary numbers for each year of age and each gender combination. In addition, if the function runs successfully, the following message will be printed: "Dietary Diary Pooling completed"

Note

The input to diet.diary.pools, diet.diaries, is created by reading in the Diet_diaries input file (specified on the Run file) with the read.diet.diaries function within the run function.

Author(s)

Kristin Isaacs, Graham Glen

See Also

Diet_diaries, run, read.run.file, Run


HumanExposure/SHEDSDevel documentation built on Oct. 30, 2019, 6:49 p.m.