1 Introduction
1.1 What is LexOPS?
LexOPS is an R package and shiny app for generating word stimuli that can be used in Psychology experiments. The package is designed to be intuitive, and is similar in style to the tidyverse.
I originally wrote the package for generating word stimuli, but it can be used to generate matched items from any database of features.
Here are 3 main advantages of using LexOPS to generate your stimuli:
Speed: It’s just much faster than creating well-controlled stimuli manually.
Reproducibility: if a random seed is set, LexOPS pipelines will generate the same stimuli each time the code is run. This means you can openly share the code that generated your stimuli, and anyone can reproduce your result.
Replicability: if no random seed is set, LexOPS pipelines will generate different stimuli each time the code is run. This means if you share your code, anyone can generate a novel set of stimuli for the same experimental design, that can be used to try and replicate any experimental result.
The package began as a series of R scripts, written to automate tasks I found myself repeating again and again when designing experiments. I decided to make it into a fully-fledged package because despite the huge range of freely available lists of word norms and features, there were no task-general solutions for using such lists to generate word stimuli.
1.2 Installation
Installing R
You can find the latest version of R here: https://cloud.r-project.org/. You might also want to install an IDE like the popular RStudio.
1.3 The Shiny App
LexOPS features a graphical user interface in the form of a shiny app (for more on shiny apps, see https://shiny.rstudio.com/). This features useful visualisations of data and selected options, and may be more friendly to users less familiar with R.
Once LexOPS is installed, the shiny app can be run with:
A demo version of the shiny app with limited usage is also available
as a web app online, at https://jackt.shinyapps.io/lexops/,
but it is much faster and more reliable to run it locally with the
run_shiny()
function.
1.4 The LexOPS Dataset
LexOPS works can work with any list of features. Even so, LexOPS has inbuilt dataset with some features for English words that I’ve found useful in the past. This can be called with:
For details on the variables included, see https://rdrr.io/github/JackEdTaylor/LexOPS/man/lexops.html.
Note that in addition to citing LexOPS, you should cite the sources for any materials you use.
1.5 Using other Datasets
LexOPS functions will work on any dataframe. The following sections might be useful if you’re using LexOPS on your own datasets:
- Custom Dataframes: A section of the walkthrough showing how to use LexOPS on your own dataset.
- Applications to Participant Selection: A vignette showing how you can use a dataset which has nothing to do with words.
- Using Data from Custom Sources: A vignette showing how you can join the LexOPS dataset to other lists of word features.