knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
library(lifelogr)
There are 3 functions which allow for a series of plots with just one function
call: plot_sleep_all
, plot_daily_all
, and plot_intraday_all
. Each acts
like the plot.lm
function, where users must click "enter" to see the next plot.
Each plot within the generic plot function can also be called individually.
Here are the sleep plots for EX:
plot_sleep_all(EX)
Users can also call each function individually using
plot_sleep(person, plot_type)
.
For example:
plot_sleep(EX, "by_datetime")
Some plots have other options.
For example, plot_sleep_start_end
has a color_var = "day_of_week"
argument
to color the lines by day of the week instead of weekend/weekday.
plot_sleep_start_end(EX, "day_of_week")
Here are the plots for the daily totals for EX:
plot_daily_all(EX)
Users can also call each function individually using:
plot_daily(EX, "steps")
Here are the plots for intraday data (multiple data points collected within each day). The default is to aggregate the data by time intervals within each day so that data for a "typical day" is displayed.
plot_intraday_all(EX)
However, it is also possible to specify that the plots use the raw data and plot over all date-times.
plot_intraday_all(EX, FALSE)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.