Description Usage Arguments Author(s) Examples
The function takes an existing dataframe, which contains variables of both systolic and diastolic observations, and measures these against a set of treatment target levels. The target levels are set as: 130/80, 140/80, 140/90 and 150/90. A separate logical variable is produced for each target, with a TRUE or FALSE value to indicate whether the test value is below the respective target levels. The full set of target variables are appended to the existing dataframe.
1 | tgt_bp(x)
|
x |
Dataframe containing a set of blood pressure observations. The created target variables will be appended to this dataframe. |
y |
Numeric vector of systolic blood pressure values. |
z |
Numeric vector of diastolic blood pressure values. |
Julian Collins
1 2 3 4 5 6 7 8 9 10 11 | # systolic bp values
sys <- sample(90:200, 50)
# diastolic bp values
dias <- sample(40:120, 50)
# combine into dataframe [bp pairs may be unrealistic due to randomness]
bp <- tibble::tibble(sys, dias)
# Measure the blood pressure values against the full set of targets, adding logical variables to the dataframe
data <- tgt_bp(bp, sys, dias)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.