Introduction to lifelogr's visualization functions

knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

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.

Sleep Plots

Here are the sleep plots for 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")

Daily Total Plots

Here are the plots for the daily totals for EX:


Users can also call each function individually using:

plot_daily(EX, "steps")

Within Each day Plots

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.


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)

Try the lifelogr package in your browser

Any scripts or data that you put into this service are public.

lifelogr documentation built on May 2, 2019, 6:11 a.m.