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")
)

Arguments

x

The (pre)registration object (as produced by a call to prereg_initialize()).

item

The identifier of the item for which to specify the justification of the (pre)registration content.

decision, justification, assertion, source

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).

content

Optionally, content to specify or append for this item.

append

Whether to replace (append=FALSE) or append (append=TRUE) the content if an item already contains some content.

validate

Whether to validate the specified content for each item using the validation rules in the (pre)registration form.

requireValidContent

Whether to only store new content if it passes validation. Note that this is ignored if validate=FALSE.

silent

Whether to be silent or chatty.

Value

x, invisibly

Examples

### 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]