prereg_justify: Justify (and optionally specify) the content for one or more...

View source: R/prereg_justify.R

prereg_justifyR Documentation

Justify (and optionally specify) the content for one or more (pre)registration items

Description

Justify (and optionally specify) the content for one or more (pre)registration items

Usage

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

preregr documentation built on May 31, 2023, 7:10 p.m.