plot_i: Line graph for a single continuous variable.

Description Usage Arguments Value Functions See Also Examples

View source: R/viz_intraday.R

Description

Provides a "quick-and-dirty" approach to plotting a line graph for a single continuous variable using defaults for axis and title labels. Users can specify if they want to look at an aggregate of a variable over the course of a day (avg_to_get_typical_day = TRUE) or look at that variable at every interval (i.e. every 15 minutes for the entire date range).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plot_i(person, measure_var, avg_to_get_typical_day = TRUE)

plot_i_steps(person, avg_to_get_typical_day = TRUE)

plot_i_floors(person, avg_to_get_typical_day = TRUE)

plot_i_cal(person, avg_to_get_typical_day = TRUE)

plot_i_active_min(person, avg_to_get_typical_day = TRUE)

plot_i_hr(person, avg_to_get_typical_day = TRUE)

plot_i_hr_datetime(person)

plot_i_weight(person, avg_to_get_typical_day = TRUE, unit = "lb")

Arguments

person

An instance of the Person class

measure_var

character vector denoting the variables of interest. Options are one or more of: "steps", "floors", "distance", "caloriesBurned","bpm" (heart rate), "weight".

avg_to_get_typical_day

Logical variable "daily" for an aggregate of the variable over the course of a day, or "intraday" for the variable at every interval over the range. Default is TRUE.

unit

Unit of measurement for plot_i_weight(). Default is "lb", but "kb" can also be specified

Value

ggplot object

Functions

See Also

get_hr_zones

Examples

1
2
3
data(EX)
plot_i(EX, "steps")
plot_i(EX, "distance", FALSE)

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