Description Usage Arguments Value Examples
Prints one of six plots: two are related to quantity of sleep, and four are related to quality of sleep 1. Sleep by day of week (bar graph) 2. Start and end of sleep period for each day in the range 3. Duration of sleep and time asleep over time 4. Proportion of time spent restless out of total sleep duration over time 5. Time spent restless over time (in minutes) 6. Sleep quality over time (subjective score, out of 100)
1 | plot_sleep(person, plot_type = "all", ...)
|
person |
An instance of the Person class |
plot_type |
The type of plot. Options include: "by_weekday", "by_start_end_time", "by_datetime", "by_restless_prop", "by_restless_min", "by_quality". Default is to plot all six. |
... |
Extra arguments used to specify the 'color_var' for the 'by_start_end_time' plot |
NULL, but plots print to screen
1 2 | data(EX)
plot_sleep(person = EX)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.