The englelab
package has a convenient function to download template R scripts for the tasks we host on our website
englelab::get_script(type = "raw", to = "R Scripts",
ospan = TRUE, symspan = TRUE, rotspan = TRUE,
antisaccade = TRUE, visualarrays = TRUE, sact = TRUE,
flankerDL = TRUE, stroopDL = TRUE)
get_script()
The first two arguments you should specify is the type of R Script you want to download and the location you want to download the R Script to (by default set to “R Scripts”).
type: You can download R Scripts:
type = "raw"
To download R scripts to create tidy raw data files
type = "score"
To download R scripts to create scored data files
type = "all"
To download both types of R scripts
to: Save to a folder within your project directory (i.e. “R Scripts”)
Next, you will want to specify the tasks you want to download R Scripts for. The options are:
wmc: Download the scripts for operation span, symmetry span, and rotation span. wmc = TRUE
ospan: Download the script for operatoin span. ospan = TRUE
symspan: Download the script for symmetry span. symspan = TRUE
rotspan: Download the script for rotation span. rotspan = TRUE
ac: Download the scripts for all attention control tasks ac = TRUE
antisaccade: Download the script for the antisaccade. antisaccade = TRUE
visualarrays: Download the script for the visual arrays. va = TRUE
sact: Download the script for the sustained attention to cue task. sact = TRUE
flankerDL: Download the script for the adaptive flanker deadline. flankerDL = TRUE
stroopDL: Download the script for the adaptive stroop deadline. stroopDL = TRUE