manual_compendium_reference: Manually Encode Direct Observation Intensities by...

View source: R/manual_compendium_reference.R

manual_compendium_referenceR Documentation

Manually Encode Direct Observation Intensities by Cross-Referencing the Compendium of Physical Activities

Description

Manually Encode Direct Observation Intensities by Cross-Referencing the Compendium of Physical Activities

Usage

manual_compendium_reference(
  obs_data,
  kids = c("yes", "no"),
  mvpa = c("yes", "no")
)

Arguments

obs_data

A data frame outputted from data_collection_program with interactive = FALSE

kids

A character scalar in c("yes", "no"): Should intensities be determined using youth cutoffs for light intensity (2 metabolic equivalents, not 1.5) and moderate intensity (4 metabolic equivalents, not 3) physical activity? Default is "yes", with a warning that the value was not manually set.

mvpa

A character scalar in c("yes", "no"): Should moderate and vigorous physical activity be coded as a single category (i.e., MVPA)? Default is "yes", with a warning that the value was not manually set.

Value

A list with three elements. The first (data) is the original data, where a Final_Intensity column has been populated to the extent possible, with "Indeterminate" listed for the other activities. The second element (indeterminate) is another list, which has one element for each activity in data with Final_Intensity = "Indeterminate". The elements of indeterminate are named after the activity they represent, and the contents are a subset of the Compendium giving suggested matches for the activity, based on its description in data. The third element (compendium) gives the entire compendium, which can be manually cross-referenced for cases where the suggested matches in indeterminate do not give a suitable match.

See Also

Other processing functions: compendium_reference(), interactive_compendium_reference()

Examples

data(example_data)

example_data_processed <- compendium_reference(example_data, FALSE,
   kids = "yes", mvpa = "yes")

if (interactive()) {
 View(example_data_processed$data)
 View(example_data_processed$indeterminate[[1]])
 View(example_data_processed$compendium)
}


Observation documentation built on Sept. 5, 2022, 9:06 a.m.