apply_cleanup_change: Applies user-selected changes to auto cleanup

Description Usage Arguments Value Examples

View source: R/process.R

Description

apply_cleanup_change applies to each event the user-selected changes to the automatic cleanup based on information stored in the RDS file using verify_cleanup_app which was created using either blink_cleanup or artifact_cleanup.

Usage

1

Arguments

data

A data frame object created from downsample.

LogFile

A character string indicating the name (and location) of the log file.

Value

An object of type data table as described in tibble.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if (interactive()) {

# Load example data
data("Pupilex3")

# Ensure the log file exists by running cleanup
# Writing log file to temporary folder for the example
dat <- clean_blink(Pupilex3, BlinkPadding = c(100, 100), Delta = 5,
                   MaxValueRun = 5, NAsAroundRun = c(2,2),
                   LogFile = paste0(tempdir(),"/BlinkCleanupLog.rds"))

# Read log file from temporary folder
verify_cleanup_app(dat, LogFile = paste0(tempdir(),"/BlinkCleanupLog.rds"))

# Make verification via the app interface

# Read log file from the temporary folder
dat <- apply_user_cleanup(dat,
                          LogFile = paste0(tempdir(),"/BlinkCleanupLog.rds"))
}

# Please see the vignettes for detailed example usage.
# vignette("PupilPre_Cleanup", package="PupilPre")

PupilPre documentation built on March 14, 2020, 1:08 a.m.