act.diary.pools: act.diary.pools

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

View source: R/ShedsHT.R

Description

Assigns activity diaries from the Activity_diaries input on the Run file (read through the read.act.diaries function) to pools based on age, gender, and season

Usage

1
act.diary.pools(diaries, specs)

Arguments

diaries

A data set created internally in SHEDS.HT through the read.act.diaries function. The data are activity diaries, which indicate the amount of time and level of metabolic activity in various micro environments. Each line of data represents one person-day (24 hours).

specs

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

Details

The act.diary.pools function assigns the activity 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

pool A vector of lists. The length of pool is the product of the genders, seasons, and ages inputs specified in the Run file. Each element is a list of acceptable activity diary numbers for each year of age, gender, weekend, and season combination. For example, pool[100] may have the name M0P99, which indicates that it is for males, on weekdays, in spring,for age=99. In addition, If the function runs successfully, the following message will be printed: "Activity Diary Pooling completed"

Note

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

Author(s)

Kristin Isaacs, Graham Glen

See Also

run


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