process_units: Process units argument

View source: R/utils.R

process_unitsR Documentation

Process units argument

Description

Process units argument

Usage

process_units(units, specified_units)

Arguments

units

What should the units of the compositional variables be in any output? Currently available are "unitless" (where working in terms of proportions), "hr/day", "hr/wk", "min/day", "min/wk" and "specified", in which case the specified_units argument should be set. Note that this doesn't specify the input units, as this is not relevant for any function.

specified_units

If units are being specified via the composition sum, this is where it is done. It should be a vector where the first argument is a string describing the units, and the second argument is the expected sum of a composition e.g. c("hr/day", 24)


OxWearables/epicoda documentation built on Dec. 7, 2022, 9:07 p.m.