View source: R/ep.eye_preprocess_helpers.R
| ep.eye_downsample | R Documentation | 
Downsample gaze and/or pupil data
ep.eye_downsample(
  df,
  sample.rate = 1000,
  downsampled_freq = 20,
  digital_channels = c("eventn", "saccn", "fixn", "blinkn", "block_trial"),
  analog_channels = c("xp", "yp", "ps"),
  char_channels = c("et.msg", "block", "event"),
  method = "mean",
  rcpp = TRUE
)
df | 
 data.table to downsample (usually this is ep.eye$raw)  | 
sample.rate | 
 sampling rate of the eyetracker in Hz  | 
downsampled_freq | 
 Frequency of the downsampled data indicating degree of downsampling. It is important to be mindful of your sampling rate when selecting this value. Defaults to 20 (which moves a second of recording at 1000Hz to 20 measurements).  | 
digital_channels | 
 Character vector of columns in df that are integer values that should not be combined but blocked by.  | 
analog_channels | 
 Character vector of columns in df that are continually varying and should be summarized within the downsampling procdure (incl x and y gaze position and pupil size)  | 
char_channels | 
 Character vector of columns in df that represent values that should be combined if there are unique values within a downsampling block. If there are multiples within a downsampling block will paste them together with " || "  | 
method | 
 String "mean" or "subsample" determining whether to perform subsampling (keep every n measurement) or mean-based downsampling.  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.