cleanData: Clean up of pre-processed data

View source: R/cleanData.R

cleanDataR Documentation

Clean up of pre-processed data


Clean up of pre-processed data


cleanData(raw_fix = data, removeOutsideText = TRUE,
  removeBlinks = TRUE, combineNearbySmallFix = TRUE,
  combineMethod = "char", combineDist = 1, removeSmallFix = TRUE,
  smallFixCutoff = 80, removeOutliers = TRUE, outlierMethod = "ms",
  outlierCutoff = 800, keepRS = FALSE, silent = FALSE)



Dataframe containing the raw fixation data that were extracted with the EMreading package


A logical inicating whether to remove all fixations outside the text and/or screen area. The default is TRUE.


A logical indicating whether to exclude all blinks from the data. The default (and recommended) setting is TRUE.


A logical indicating whether to merge small fixations < 80 ms that are within 1 character space of another fixation (the small fixation will be merged with the nearby fixation). The default is TRUE.


Method for combining small fixations. Accepted values are "char" for combaining based on a distance in characters and "pix" for combining based on distance in pixels. The default is "char".


Distance for combining small fixations. Small fixations will be combined only if they occur within this distance of another fixation. Based on the input to 'combineMethod' above, enter a numeric value either in number of characters or in number of pixels. The default is 1 (characters).


A logical indicating whether to remove any remaining fixations smaller than a certain cut-off. The default is TRUE


A numerical value indiciating the cut-off for removing small fixations (the default is 80 ms). Any values smaller than this number will be removed.


A logical indicating whether to remove outliers from the data (default is TRUE). This parameter also requires the specification of a method and cutoff for outlier exclusion (see below)


A string indicating what type of outlier exclusion method to use. Allowed are 2 methods: "ms" for exclusion of fixations based on a number in milliseconds; or "std" for exlusion based on values that are a certain number of standard deviations above the subject's mean.


Numerical value that specifies the cut-off for removing outliers. If you chose "ms" in "outlierMethod", please specify a number in ms (e.g., 800). if you chose "std", please enter a number in standard deviations above the mean (e.g., 3).


A logical indicating whether to keep return sweep fixations from merging (FALSE by default)


A logical indicating whether to print output regarding merged fixations. Set to FALSE if you don't want this output (default is TRUE).


Martin R. Vasilev

martin-vasilev/EMreading documentation built on Jan. 31, 2023, 3:23 p.m.