View source: R/compute_cyclopean_samples.R
compute_cyclopean_samples | R Documentation |
Computes cyclopean samples by averaging over binocular recorded properties
such as pxL
/pxR
, pyL
/pyR
, hxL
/hxR
,
etc. Uses function specified via fun
parameter to compute the average with na.rm = TRUE
option.
In case of a monocular recording or when the information from one eye missing,
uses information from one eye only, ignoring the other column.
In both binocular and monocular recording cases, simplifies column names
so that pxL
and/or pxR
are replaced
with a single column px
, pyL
/pyR
with py
, etc.
compute_cyclopean_samples(object, fun = mean)
## S3 method for class 'data.frame'
compute_cyclopean_samples(object, fun = mean)
## S3 method for class 'eyelinkRecording'
compute_cyclopean_samples(object, fun = mean)
object |
Either an |
fun |
Function used to average across eyes, defaults to |
Object of the same time as input, i.e., either a eyelinkRecording
object
with modified samples
slot or a data.frame with cyclopean samples.
data(gaze)
# by passing samples table
cyclopean_samples <- compute_cyclopean_samples(gaze$samples)
# storing cyclopean samples as a separate table in recording
gaze$cyclopean_samples <- compute_cyclopean_samples(gaze$samples)
# by passing the recording, cyclopean samples replace original ones
gaze <- compute_cyclopean_samples(gaze)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.