plot.eyeris | R Documentation |
eyeris
S3 plotting method for objects of class eyeris
. Plots a single-panel
timeseries for a subset of the pupil timeseries at each preprocessing step.
The intended use of this function is to provide a simple method for
qualitatively assessing the consequences of the preprocessing recipe and
parameters on the raw pupillary signal.
## S3 method for class 'eyeris'
plot(
x,
...,
steps = NULL,
num_previews = NULL,
preview_duration = NULL,
preview_window = NULL,
seed = NULL,
block = 1,
plot_distributions = TRUE
)
x |
An object of class |
... |
Additional arguments to be passed to |
steps |
Which steps to plot; defaults to |
num_previews |
Number of random example "epochs" to generate for previewing the effect of each preprocessing step on the pupil timeseries. |
preview_duration |
Time in seconds of each randomly selected preview. |
preview_window |
The start and stop raw timestamps used to subset the
preprocessed data from each step of the |
seed |
Random seed for current plotting session. Leave NULL to select
|
block |
For multi-block recordings, specifies which block to plot.
Defaults to 1. When a single |
plot_distributions |
Logical flag to indicate whether to plot both
diagnostic pupil timeseries and accompanying histograms of the pupil
samples at each processing step. Defaults to |
No return value; iteratively plots a subset of the pupil timeseries from each preprocessing step run.
# first, generate the preprocessed pupil data
my_eyeris_data <- system.file("extdata", "memory.asc", package = "eyeris") |>
eyeris::load_asc() |>
eyeris::deblink(extend = 50) |>
eyeris::detransient() |>
eyeris::interpolate() |>
eyeris::lpfilt(plot_freqz = TRUE) |>
eyeris::zscore()
# controlling the timeseries range (i.e., preview window) in your plots:
## example 1: using the default 10000 to 20000 ms time subset
plot(my_eyeris_data, seed = 0)
## example 2: using a custom time subset (i.e., 1 to 500 ms)
plot(my_eyeris_data, preview_window = c(1, 500), seed = 0)
# controlling which block of data you would like to plot:
## example 1: plots first block (default)
plot(my_eyeris_data, seed = 0)
## example 2: plots a specific block
plot(my_eyeris_data, block = 1, seed = 0)
## example 3: plots a specific block along with a custom preview window
plot(
my_eyeris_data,
block = 1,
preview_window = c(1000, 2000),
seed = 0
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.