knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
For a detailed overview of how to use trimr, please see the vignettes.
A stable release of trimr is available on CRAN. To install this, use:
install.packages("trimr")
You can also install the latest developmental version of trimr. Please note, though, that this version is undergoing testing and potentially has unidentified bugs. (If you do use this version and note a bug, please log it as an issue). To install the developmental version, you will first need to install the devtools package and install trimr directly from GitHub by using the following commands:
# install devtools install.packages("devtools") # install trimr from GitHub devtools::install_github("JimGrange/trimr")
trimr is an R package that implements most commonly-used response time trimming methods, allowing the user to go from a raw data file to a finalised data file ready for inferential statistical analysis.
The trimming functions available in trimr fall broadly into three families:
The latter implements the methods first suggsted by Van Selst & Jolicoeur (1994).
In the example below, we go from a data frame containing data from 32 participants (in total, 20,518 trials) to a trimmed data set showing the mean trimmed RT for each experimental condition & participant using the modified recursive trimming procedure of Van Selst & Jolicoeur (1994):
# load trimr's library library(trimr) # load the example data that ships with trimr data(exampleData) # look at the top of the example raw data head(exampleData) # perform the trimming trimmedData <- modifiedRecursive(data = exampleData, minRT = 150, digits = 0) # look at the trimmedData trimmedData
To install the package from GitHub, you need the devools package:
install.packages("devtools") library(devtools)
Then trimr can be directly installed:
devtools::install_github("JimGrange/trimr")
Van Selst, M., & Jolicoeur, P. (1994). A solution to the effect of sample size on outlier elimination. Quarterly Journal of Experimental Psychology, 47 (A), 631–650.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.