
This open-source, R-based web application is suitable for teaching and research in the experimental sciences. It creates varied data sets with specified structures, such as between-group or within-participant variables that can be categorical or continuous. These features are set across the tabs of the app. In the penultimate tab, users can build a custom summary of the current data set, and in the last tab they can download the data set along with the list of parameters.
This open-source, R-based web application is suitable for teaching and research in the experimental and quantitative sciences. It creates varied data sets with specified structures, such as between-group and within-participant variables that can be categorical or continuous. The parameters are set in the tabs (sections) of the top menu, and the data set can be downloaded from the last tab. The application saves time and offers flexible control over the parameters.
The diagram below outlines the path from setting the parameters to downloading the simulated data set.
General guidelines include the following:
In the names of variables, it is best to use only alphanumeric characters and underscores, which can separate words (e.g., variable_name). Each variable needs a different name.
In the levels of categorical variables, alphanumeric characters, special characters and spaces are allowed.
In numeric fields (e.g., ‘Mean’, ‘Standard deviation’, ‘Relative probability [0, 1]’), only numbers and decimal points are allowed.
As the data set grows, so does the processing time.
More specific guidelines are available in each tab.
Figure 1 shows the Dependent tab, where the parameters of the dependent variables are set.

To cite this application, please use the Bernabeu and Lynott (2024) entry in the References list below.
This web application was developed in R (R Core Team, 2020). The code is available on GitHub, where contributions are welcome. A copy is archived on Zenodo (Bernabeu & Lynott, 2024). The initial code drew on Section 5.7 (‘Simulating Data for Multi-Factor Designs’) of Crump (2017). The R packages used include dplyr (Wickham et al., 2020), DT (Xie et al., 2020), flexdashboard (Iannone et al., 2020), shiny (Chang et al., 2020) and stringr (Wickham, 2019).
The app can be developed or run locally in two ways.
This option involves four steps.
[Only needed in local R/RStudio] Install the package versions used in the latest release of this application by running:
install.packages('devtools')
library(devtools)
install_version('dplyr', '1.0.2', 'https://cloud.r-project.org')
install_version('DT', '0.15', 'https://cloud.r-project.org')
install_version('flexdashboard', '0.5.2', 'https://cloud.r-project.org')
install_version('htmltools', '0.5.0', 'https://cloud.r-project.org')
install_version('knitr', '1.30', 'https://cloud.r-project.org')
install_version('ngram', '3.0.4', 'https://cloud.r-project.org')
install_version('purrr', '0.3.4', 'https://cloud.r-project.org')
install_version('shiny', '1.5.0', 'https://cloud.r-project.org')
install_version('stringr', '1.4.0', 'https://cloud.r-project.org')
install_version('tidyr', '1.1.2', 'https://cloud.r-project.org')Open the index.Rmd script.
Run the application by clicking ▶️ Run Document at the top left or by running rmarkdown::run('index.Rmd') in the console.
Click Open in Browser at the top left.
The README of the GitHub repository explains how to build and run the app with the Dockerfile.
Thank you to RStudio (now Posit) for hosting this application free of charge on shinyapps.io.
Bernabeu, P., & Lynott, D. (2024). Experimental-data-simulation (Version 1.4.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.10615953
Chang, W., Cheng, J., Allaire, J. J., Xie, Y., & McPherson, J. (2020). shiny: Web application framework for R (Version 1.5.0) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.shiny
Crump, M. J. C. (2017). Programming for psychologists: Data creation and analysis (Version 1.1). https://www.crumplab.com/programmingforpsych/
Iannone, R., Allaire, J. J., & Borges, B. (2020). flexdashboard: R Markdown format for flexible dashboards (Version 0.5.2) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.flexdashboard
R Core Team. (2020). R: A language and environment for statistical computing [Computer software]. R Foundation for Statistical Computing. https://www.R-project.org/
Wickham, H. (2019). stringr: Simple, consistent wrappers for common string operations (Version 1.4.0) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.stringr
Wickham, H., François, R., Henry, L., & Müller, K. (2020). dplyr: A grammar of data manipulation (Version 1.0.2) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.dplyr
Xie, Y., Cheng, J., & Tan, X. (2020). DT: A wrapper of the JavaScript library ‘DataTables’ (Version 0.15) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.DT
Questions and feedback can be posted as an issue or emailed to Pablo Bernabeu at pcbernabeu@gmail.com.
Comments are provided by Disqus and are not loaded automatically. Loading them connects your browser to Disqus, which may use cookies and process data under its privacy policy. See this site's privacy notice for details.