Graphing events
plot_1s_epoch.Rd
Graphing the activity and sleep during the wear period.
Arguments
- data
A
one.epoch.data
object created bycreate_1s_epoch()
.- sleep_times
A
data.frame
that contains information on sleep and nap windows during the wear period. The data set must contain the following variables and the default isNULL
denoting sleep data does not need to be included.a date-time object named
sleep_start
denoting sleep and nap onseta date-time object named
sleep_stop
denoting sleep and nap wake timesan integer vector named
day
denoting wear daya character vector named
label
denoting the type of sleep
- plot
A logical denoting where the plot should appear.
Value
A ggplot2::ggplot()
object that may be displayed or saved later.
Details
Activities are generally grouped by 300 second intervals; however, if the day does not last more than 300 seconds then the activities are grouped by 50 second intervals. The specific acitivies examined in the plot are standing, walking, and laying.
Examples
if (FALSE) { # \dontrun{
process_dat <- process_events(data = dat)
sec_by_sec <- create_1s_epoch(data = process_dat)
g <- plot_1s_epoch(sec_by_sec)
} # }