Adds an Rmarkdown preregistration template to a 'worcs' project.
Usage
add_preregistration(
worcs_directory = ".",
preregistration = "cos_prereg",
verbose = TRUE,
...
)Arguments
- worcs_directory
Character, indicating the directory in which to create the manuscript files. Default: '.', which points to the current working directory.
- preregistration
Character, indicating what template to use for the preregistration. Default:
"cos_prereg"; use"None"to omit a preregistration. See Details for other available choices.- verbose
Logical. Whether or not to print messages to the console during project creation. Default: TRUE
- ...
Additional arguments passed to and from functions.
Details
Available choices include the templates from the
prereg package, and several unique templates
included with worcs:
'PSS'Preregistration and Sharing Software (Krypotos, Klugkist, Mertens, & Engelhard, 2019)
'Secondary'Preregistration for secondary analyses (Mertens & Krypotos, 2019)
'aspredicted_prereg'aspredicted template from the
preregpackage'brandt_prereg'brandt template from the
preregpackage'cos_prereg'cos template from the
preregpackage'fmri_prereg'fmri template from the
preregpackage'prp_quant_prereg'prp_quant template from the
preregpackage'psyquant_prereg'psyquant template from the
preregpackage'rr_prereg'rr template from the
preregpackage'vantveer_prereg'vantveer template from the
preregpackage
Examples
the_test <- "worcs_prereg"
old_wd <- getwd()
dir.create(file.path(tempdir(), the_test))
file.create(file.path(tempdir(), the_test, ".worcs"))
#> [1] TRUE
add_preregistration(file.path(tempdir(), the_test),
preregistration = "cos_prereg")
#> ✔ Creating preregistration files.
setwd(old_wd)
unlink(file.path(tempdir(), the_test))
