R Markdown Templates to Preregister Scientific Studies

The R Markdown templates in this package are based on the Center for Open Science Preregistration Challenge and the 'AsPredicted.org' questions. They are, thus, particularly suited to draft preregistration documents for these programs but can also be used for internally.


prereg provides R Markdown templates that facilitates authoring preregistrations of scientific studies in PDF format. The templates are based on the Center for Open Science Preregistration Challenge and the AsPredicted.org questions. They are, thus, particularly suited to draft preregistration documents for studies these programs but can also be used for internal preregistrations.

If you experience any problems or have suggestions for improvements, please open an issue.

To use R Markdown and prereg you need the following software on your computer:

You can install the stable version of prereg from CRAN

install.packages("prereg")

or the development version from this GitHub repository (you may have to install the devtools package first).

install.packages("devtools")
devtools::install_github("crsh/prereg")

Once you have installed the prereg you can select the templates when creating a new R Markdown file through the RStudio menus.

prereg produces a clean form-like document.

The template file contains comments that provide further details on how to fill in the form but are invisible in the final PDF document.

If you want to use prereg without RStudio you can use the rmarkdown::render function to create preregistration documents:

# Create new COS preregistration challenge R Markdown file
rmarkdown::draft(
  "my_preregistration.Rmd"
  , "cos_prereg"
  , package = "prereg"
  , create_dir = FALSE
  , edit = FALSE
)
 
# Render document
rmarkdown::render("my_preregistration.Rmd")

The templates for the preregistrations were developed by the Center for Open Science and AsPredicted.org, respectively. I thank both for their permission to use their material in this package.

News

prereg 0.2.0

  • New template based on AsPredicted.org questions. See ?aspredicted_prereg.

prereg 0.1.0

Initial release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("prereg")

0.2.0 by Frederik Aust, 9 months ago


https://github.com/crsh/prereg


Report a bug at https://github.com/crsh/prereg/issues


Browse source code at https://github.com/cran/prereg


Authors: Frederik Aust [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports rmarkdown

Suggests testthat


See at CRAN