You can load this project in Rstudio by opening the file called
File | Description | Usage |
---|---|---|
README.md | Description of project | Human editable |
worcstest.Rproj | Project file | Loads project |
LICENSE | User permissions | Read only |
.worcs | WORCS metadata YAML | Read only |
preregistration.rmd | Preregistered hypotheses | Human editable |
prepare_data.R | Script to process raw data | Human editable |
manuscript/references.bib | BibTex references for manuscript | Human editable |
renv.lock | Reproducible R environment | Read only |
This project uses the Workflow for Open Reproducible Code in Science (WORCS) to ensure transparency and reproducibility. The workflow is designed to meet the principles of Open Science throughout a research project. For more details, please read the preprint at https://osf.io/zcvbs/
- Create a new Private repository on github, copy the https:// link to clipboard
The link should look something like https://github.com/yourname/yourrepo.git - In Rstudio, click File > New Project > New directory > WORCS Project Template
a. Paste the GitHub Repository address in the textbox
b. Keep the checkbox for
renv
checked if you want to document all dependencies (recommended) c. Select a preregistration template - Write the preregistration
.Rmd
- In the top-right corner of Rstudio, select the Git tab, select the checkboxes next to all files, and click the Commit button. Write an informative message for the commit, e.g., "Preregistration", again click Commit, and then click the green Push arrow to send your commit to GitHub
- Go to the GitHub repository for this project, and tag the Commit as a preregistration
- Optional: Render the preregistration to PDF, and upload it to AsPredicted.org or OSF.io as an attachment
- Optional: Add study Materials (to which you own the rights) to the repository. It is possible to solicit feedback (by opening a GitHub Issue) and acknowledge outside contributions (by accepting Pull requests)
- Read the data into R, and document this procedure in
prepare_data.R
- Use
open_data()
orclosed_data()
to store the data - Write the manuscript in
Manuscript.Rmd
, using code chunks to perform the analyses. - Regularly commit your progress to the Git repository; ideally, after completing each small and clearly defined task. Use informative commit messages. Push the commits to GitHub.
- Cite essential references with one at-symbol (
[@essentialref2020]
), and non-essential references with a double at-symbol ([@@nonessential2020]
).
- To save the state of the project library (all packages used), call
renv::snapshot()
. This updates the lockfile,renv.lock
. - To render the paper with essential citations only for submission, change the line
knit: worcs::cite_all
toknit: worcs::cite_essential
. Then, press the Knit button to generate a PDF
- Make the GitHub repository public
- Create an OSF project; although you may have already done this in Step 6.
- Connect your GitHub repository to the OSF project
- Add an Open Science statement to the manuscript, with a link to the OSF project
- Optional: Publish preprint in a not-for-profit preprint repository such as PsyArchiv, and connect it to your existing OSF project
- Check Sherpa Romeo to be sure that your intended outlet allows the publication of preprints; many journals do, nowadays - and if they do not, it is worth considering other outlets.