# NOT RUN {
# Pregnancy Data Set
# bp_preg requires the use of the index argument since there are no DATE or
# DATE_TIME columns available
data_preg <- bp::bp_preg
data_preg$Time_Elapsed <- factor(data_preg$Time_Elapsed,
levels = c("Booking", "0", "30", "60", "90", "120", "150", "180", "210", "240"))
bp::bp_ts_plots(data_preg, index = 'time_elapsed', subj = 1:3)
# JHS Data Set
# bp_jhs returns two lists since there is a DATE_TIME column: one for
# DATE_TIME and one for HOUR
data_jhs <- bp::process_data(bp::bp_jhs,
sbp = 'sys.mmhg.',
dbp = 'dias.mmhg.',
hr = 'pulse.bpm.',
date_time = 'datetime')
bp::bp_ts_plots(data_jhs)
# HYPNOS Data Set
# bp_hypnos wraps the plots by the visit # since each subject was recorded over
# the course of two office visits
data_hypnos <- bp::process_data(bp::bp_hypnos,
sbp = 'syst',
dbp = 'diast',
date_time = 'date.time')
bp::bp_ts_plots(data_hypnos, wrap_var = 'visit', subj = '70435')
# }
Run the code above in your browser using DataLab