plot_activity: Plot activity values

View source: R/plot_agd.R

plot_activityR Documentation

Plot activity values

Description

Plot a time series of activity values (by default, the counts on the vertical axis axis1).

Usage

plot_activity(agdb, var, color = "black", nrow = NULL, ncol = NULL)

Arguments

agdb

A tibble of activity data.

var

The activity variable (unquoted) to plot on the y-axis.

color

Activity line color.

nrow, ncol

Number of rows and columns. Relevant only if the activity data is grouped.

Examples

data("gtxplus1day")
sub_gt3x <- gtxplus1day %>%
  dplyr::filter(timestamp <= lubridate::as_datetime("2012-06-27 18:00:00"))

data <- sub_gt3x %>%
  collapse_epochs(60) %>%
  apply_cole_kripke()

plot_activity(data, axis1, color = "gray")
plot_activity(data, axis1, color = "sleep")

dipetkov/actigraph.sleepr documentation built on March 25, 2022, 2:33 a.m.