plot_i {lifelogr}R Documentation

Line graph for a single continuous variable.

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

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

data(EX)
plot_i(EX, "steps")
plot_i(EX, "distance", FALSE)

[Package lifelogr version 0.1.0 Index]