plot_circadian: Plot circadian patterns in monitoring or cough (Hyfe)

Description Usage Arguments

View source: R/plot_circadian.R

Description

In these plots, the x axis is hour of day, 0 - 24.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_circadian(
  ho,
  type = c("coughs", "sessions", "sounds", "rate"),
  date_min = NULL,
  date_max = NULL,
  by_user = FALSE,
  print_plot = TRUE,
  return_plot = FALSE,
  return_data = FALSE,
  verbose = TRUE
)

Arguments

ho

A hyfe object, which is generated by process_hyfe_data(). See full details and examples in the package vignette.

type

The variable to plot.

date_min

Optionally filter the data to a minimum date. Provide as a character vector of length one, with the format "YYYY-MM-DD HH:MM:SS".

date_max

Optionally filter to a date maximum. Same format as date_min above.

by_user

If FALSE (the default), a single line will be plotted that pools all users together. If TRUE, a line will be plotted for each user separately. Note that this is only possible if the call to process_hyfe_data() that created the hyfe object used the argument by_user=TRUE.

print_plot

If TRUE (the default), the plot will be printed for you.

return_plot

If TRUE (not the default), the ggplot plot object will be returned. This can be useful if you want to modify/add to the plot (e.g., change axis titles, add a plot title, etc.).

return_data

If TRUE (not the default), a simple dataframe will be returned that provides you with the exact values used to produce the plot.

verbose

Print status updates?

time_unit

The time unit by which to plot it.


hyfe-ai/hyfer documentation built on Dec. 20, 2021, 5:53 p.m.