psychTestR is an R package for creating behavioural experiment interfaces. Key benefits of psychTestR include:

  • Easy installation
  • Supports testing on your local computer (laboratory conditions) or on a web server (online recruitment)
  • Fully within the R ecosystem, no knowledge of other programming languages required
  • Powerful back-end processing that allows you to use all the flexibility of R during test administration
  • Scales well to hundreds of concurrent users
  • Compatible with all major operating systems (Windows, Mac, Linux)
  • Easy to modularise and share your designs with other researchers

Documentation

We recommend you begin by reading psychTestR’s introductory article, and then exploring the other articles on the documentation website as and when they become relevant to your queries. Once you start writing psychTestR code, we recommend referring to the function-level documentation, which can also be accessed by running e.g. ?one_button_page at the R terminal. It may also be helpful to refer to the source code of pre-existing test implementations (see Example tests).

Examples

Citation

You can cite psychTestR as follows:

Harrison, Peter M. C. (2019). psychTestR v2.6.1. Zenodo. http://doi.org/10.5281/zenodo.1415355

where you should replace the version number with the version number that you used, which you can find from R as follows:

Ideally you should also update the year to match the release date of the psychTestR version that you used, which you can find at the Zenodo link.

Note that the DOI link provided above is constant between versions, but you can find version-specific DOI links on Zenodo.

Local installation

If you don’t have R installed, download and install it first.

We recommend also installing RStudio, a popular integrated development environment for R.

Then open R and install psychTestR:

Local demo

Once psychTestR is installed on your local computer, open RStudio and enter the following to run an example psychTestR test:

Once you’ve recorded some data, try logging into the admin panel with the password ‘demo’ (as specified under the opt argument to make_test()). Here you can download your response data.

Acknowledgements

psychTestR was created by Peter M. C. Harrison with useful feedback from Daniel Müllensiefen, Klaus Frieler, and Marcus Pearce. The work was was supported by Peter’s PhD studentship from the EPSRC and AHRC Centre for Doctoral Training in Media and Arts Technology (EP/L01632X/1) and by the Humboldt’s foundation Anneliese Maier research prize awarded to Daniel Müllensiefen.

License

psychTestR will always be completely free to use for both non-commercial or commercial purposes. The package is available under the MIT license.