prereg_specify: Specify the content for one or more (pre)registration items

View source: R/prereg_specify.R

prereg_specifyR Documentation

Specify the content for one or more (pre)registration items

Description

Specify the content for one or more (pre)registration items

Usage

prereg_specify(
  x,
  ...,
  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-content pairings.

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

### Load an example (pre)registration specification
data("examplePrereg_1", package = "preregr");

### Specify some fields and show the results
examplePrereg_1 |>
  preregr::prereg_specify(
    tasks_and_roles = "All authors contributed equally",
    nonExistent_item = "This can't be stored anywhere",
    start_date = "2021-9-01"
  ) |>
  preregr::prereg_show_item_completion(
    section="metadata"
  );

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