bp_tables {bp}R Documentation

Blood Pressure Tables

Description

Generate a list of pertinent table outputs that detail various information specific to blood pressure.

Usage

bp_tables(
  data,
  bp_type = c("both", "sbp", "dbp"),
  bp_perc_margin = NULL,
  wake_perc_margin = 2,
  subj = NULL
)

Arguments

data

A processed dataframe resulting from the process_data function that contains the SBP, DBP, DAY_OF_WEEK, Time_of_Day, SBP_CATEGORY, and DBP_CATEGORY columns.

bp_type

Optional argument. Determines whether to calculate tables for SBP values or DBP values, or both. For both SBP and DBP ARV values use bp_type = 'both', for SBP-only use bp_type = 'sbp, and for DBP-only use bp_type = 'dbp'. If no type specified, default will be set to 'both'

bp_perc_margin

An optional argument that determines which of the marginal totals to include in the raw count tables expressed as percentages. The argument can take on values either NULL (default, both SBP and DBP), 1 (SBP only), or 2 (DBP only).

wake_perc_margin

An optional argument that determines which of the marginal totals to include in the tables pertaining to the percentages of awake / asleep readings if applicable (i.e. if the WAKE column is present). The argument can take on values either NULL (both SBP and DBP), 1 (SBP only), or 2 (DBP only).

subj

Optional argument. Allows the user to specify and subset specific subjects from the ID column of the supplied data set. The subj argument can be a single value or a vector of elements. The input type should be character, but the function will comply with integers so long as they are all present in the ID column of the data.

Value

A list of table outputs for various subsets of the data based on which bp_type is selected

Examples

data("bp_jhs")
data("bp_hypnos")
hyp_proc <- process_data(bp_hypnos,
                         bp_type = 'abpm',
                         sbp = "syst",
                         dbp = "DIAST",
                         date_time = "date.time",
                         id = "id",
                         wake = "wake",
                         visit = "visit",
                         hr = "hr",
                         map = "map",
                         rpp = "rpp",
                         pp = "pp",
                         ToD_int = c(5, 13, 18, 23))

jhs_proc <- process_data(bp_jhs,
                         sbp = "Sys.mmHg.",
                         dbp = "Dias.mmHg.",
                         date_time = "DateTime",
                         hr = "pulse.bpm.")
rm(bp_hypnos, bp_jhs)

bp_tables(jhs_proc)
bp_tables(hyp_proc)


[Package bp version 2.1.0 Index]