htn_classify: Classify hypertension

Description Usage Arguments Value Examples

View source: R/classify_hypertension.R

Description

Classify hypertension

Usage

1
2
3
4
5
6
7
8
htn_classify(
  sbp,
  dbp,
  sbp_thresh = 130,
  dbp_thresh = 80,
  strictly_greater = FALSE,
  labels = c("normotension", "hypertension")
)

Arguments

sbp

(numeric) – systolic blood pressure values

dbp

(numeric) – diastolic blood pressure values

sbp_thresh

(numeric) – a threshold for systolic blood pressure. A value of sbp exceeding sbp_thresh indicates hypertension

dbp_thresh

(numeric) – a threshold for diastolic blood pressure. A value of dbp exceeding dbp_thresh indicates hypertension

strictly_greater

(logical) – Should hypertension only be indicated if a sbp or dbp value is strictly greater (i.e., not equal to) the corresponding threshold value? (default is FALSE)

labels

(character) – How should normotensive and hypertensive observations be labeled? Default is "normo" and "hyper" for normotensive and hypertensive blood pressure readings, respectively.

Value

a factor with two levels, one indicating normotension and the other indicating hypertension, created using the given systolic and diastolic blood pressure thresholds.

Examples

1
2
3
4
sbp <- c(120, 130, 140)
dbp <- c(70, 80, 90)

htn_classify(sbp, dbp)

bcjaeger/cleanRbp documentation built on May 26, 2021, 1:03 p.m.