Blood Pressure Tables in Graphical Format
dow_tod_plots(data, subj = NULL)
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.
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.
A list of four `gtables` that correspond to the tables for Day of Week and
Time of Day broken down by both SBP
and DBP
.
# NOT RUN {
data("hypnos_data")
hyp_proc <- process_data(hypnos_data,
sbp = "syst",
dbp = "DIAST",
bp_datetime = "date.time",
id = "id",
wake = "wake",
visit = "visit",
hr = "hr",
map = "map",
rpp = "rpp",
pp = "pp",
ToD_int = c(5, 13, 18, 23))
rm(hypnos_data)
dow_tod_plots_tmp <- dow_tod_plots(hyp_proc)
grid::grid.draw(
gridExtra::grid.arrange(dow_tod_plots_tmp[[1]], dow_tod_plots_tmp[[2]],
dow_tod_plots_tmp[[3]],dow_tod_plots_tmp[[4]],
nrow = 2, ncol = 2)
)
# }
Run the code above in your browser using DataLab