R/prereg_justify.R
prereg_justify.Rd
Justify (and optionally specify) the content for one or more (pre)registration items
prereg_justify(
x,
item,
decision = NULL,
justification = NULL,
assertion = NULL,
source = NULL,
content = NULL,
append = TRUE,
validate = TRUE,
requireValidContent = TRUE,
silent = preregr::opts$get("silent")
)
The (pre)registration object (as produced by a call to
prereg_initialize()
).
The identifier of the item for which to specify the justification of the (pre)registration content.
The decision(s) (with optionally nested within it, one or more justifications), justification(s) (with optionally nested within it, one or more assertions), assertion(s) (with optionally nested within it, one or more sources), or source(s).
Optionally, content to specify or append for this item.
Whether to replace (append=FALSE
) or append (append=TRUE
)
the content if an item already contains some content.
Whether to validate the specified content for each item using the validation rules in the (pre)registration form.
Whether to only store new content if it passes
validation. Note that this is ignored if validate=FALSE
.
Whether to be silent or chatty.
x, invisibly
### Start with an empty form, then specify and justify
### content for an item.
preregExampl <-
preregr::prereg_initialize(
"inclSysRev_v0_92"
) |>
preregr::prereg_justify(
item = "title",
content = "Example title",
decision = "We decide to call this study 'Example title'.",
justification = "It seems a fitting title for an example."
) |>
preregr::prereg_show_item_completion(
section="metadata"
);
#>
#> ── Specifying justifications for (pre)registration items ───────────────────────
#> ✔ Specified a justifier justification.
#> ✔ Specified a justifier decision.
#>
#> ── Specifying content for (pre)registration items ──────────────────────────────
#> ✔ Content specified for item Title passed validation!
#> ✔ Specified content for Title [title]
#>
#> ── Items in (pre)registration specification ────────────────────────────────────
#>
#> ℹ Form: Inclusive Systematic Review Registration Form
#> ℹ Version: 0.92
#>
#> ── Section: Metadata ──
#>
#> ✖ Target discipline [target_discipline]
#> ✔ Title [title]
#> ✖ Author(s) / contributor(s) [authors]
#> ✖ Tasks and roles [tasks_and_roles]