calc_perc_time: Calculate proportion of time above or below a threshold

Description Usage Arguments Details Value Examples

Description

calc_perc_time calculates percent time above / below a threshold

Usage

1
calc_perc_time(cont.data, thrshld, meds = TRUE)

Arguments

cont.data

A data frame with serial measurement data

thrshld

A list of the criteria

meds

An optional logical indicating whether the data contains serial medication adminstration or laboratory data, defaults to TRUE

Details

This function takes a data frame with serial measurement data and produces a data frame with percent time above or below a threshold for each infusion.

Value

A data frame

Examples

1
2
3
4
5
## Not run: 
calc_perc_time(data, list(~med.rate > 0.4))
# calculates the proportion of time where the rate is above 0.4

## End(Not run)

bgulbis/BGTools documentation built on May 12, 2019, 8:21 p.m.