Skip to contents

Plot windowed resultant length

Usage

plot_roll_resultant_length(
  obj,
  window_duration = 1,
  smooth = FALSE,
  by = 1,
  ref_lines = c(W = 0.7, M = 0.85, H = 0.95),
  align = "right",
  na.rm = TRUE
)

Arguments

obj

a sel.phases object.

window_duration

duration of window over which to take mean (default is 1 sec).

smooth

use the smoothed phase angle data (default is FALSE).

by

calculate resultant length at every by-th time point rather than every point.

ref_lines

names list of reference line values (default is c(W = 0.7, M = 0.85, H = 0.95)).

align

alignment of window (default is 'right').

na.rm

Remove NAs from the circular mean (default is TRUE).

Value

a ggplot object.

Examples

r <- get_sample_recording()
rv <- get_raw_view(r, "Central", "", "Sitar")
pv <- get_processed_view(rv)
co <- analyze_coherency(pv, columns = c("Nose_x", "Nose_y"))
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
sp <- plot_sel_phases(co, pv, sel.period = 0.64)

plot_roll_resultant_length(sp, ref_lines = c(H = 0.9998))