A data frame. It must contain columns named "participant",
"condition", "rt", and "accuracy". The RT can be in seconds
(e.g., 0.654) or milliseconds (e.g., 654). Typically, "condition" will
consist of strings. "accuracy" must be 1 for correct and 0 for error
responses.
minRT
The lower criteria for acceptable response time. Must be in
the same form as rt column in data frame (e.g., in seconds OR milliseconds).
maxRT
The upper criteria for acceptable response time. Must be in
the same form as rt column in data frame (e.g., in seconds OR milliseconds).
omitErrors
If set to TRUE, error trials will be removed before
conducting trimming procedure. Final data returned will not be influenced
by errors in this case.
returnType
Request nature of returned data. "raw" returns trial-
level data excluding trimmed data; "mean" returns mean response times per
participant for each experimental condition identified; "median" returns
median response times per participant for each experimental condition
identified.
digits
How many decimal places to round to after trimming?
Details
By passing a data frame containing raw response time data, together with
trimming criteria, the function will return trimmed data, either in the form
of trial-level data or in the form of means/medians for each subject &
condition.
Examples
# load the example data that ships with trimr
data(exampleData)
# perform the trimming, returning mean RT
trimmedData <- absoluteRT(data = exampleData, minRT = 150, maxRT = 2500,
returnType = "mean")