This function shows the next item (or items) in a (pre)registration for which to specify content (searching through all sections or through a selection of sections).

prereg_next_item(x, nrOfItems = 1, section = NULL)

Arguments

x

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

nrOfItems

The number of items to complete to show.

section

The section(s) to search; pass NULL (the default) to show everything.

Value

x, invisibly

Examples

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

### Check next item
examplePrereg_1 |>
  preregr::prereg_next_item();
#> 
#>  Form: Inclusive General-Purpose Registration Form
#>  Version: 1.1
#> 
#> The next item to complete is:
#> 
#>  Tasks and roles: Describe the expected tasks and roles of each author/contributor, for example using the Contributor Roles Taxonomy (CRediT). [tasks_and_roles]
#> 
#> To specify preregistration content, you can use the following command:
#> 
#> preregr::prereg_specify(examplePrereg_1, tasks_and_roles = "The content to
#> specify");
#> 

### Specify content for this item
examplePrereg_1 <-
  preregr::prereg_specify(
    examplePrereg_1,
    funding = paste0(
      "No funding. There's never any ",
      "funding for this kind of stuff."
    )
  );
#> 
#> ── Specifying content for (pre)registration items ──────────────────────────────
#>  Content specified for item Funding passed validation!
#>  Specified content for Funding [funding]

### Get the next three items
preregr::prereg_next_item(
  examplePrereg_1,
  nrOfItems = 3
);
#> 
#>  Form: Inclusive General-Purpose Registration Form
#>  Version: 1.1
#> 
#> The next 3 items to complete are:
#> 
#>  Tasks and roles: Describe the expected tasks and roles of each author/contributor, for example using the Contributor Roles Taxonomy (CRediT). [tasks_and_roles]
#> 
#>  Conflicts of interest: List any potential conflicts of interest (e.g., if there is a potential outcome of this study that can in any way have negative or positive effects for anybody involved in this study in terms of funding, prestige, or opportunities). If there are no conflicts of interest, please state this as such. [cois]
#> 
#>  Type of study: How would you describe the type of study you are (pre)registering (examples are "systematic review", "cost-effectiveness trial", or "observational study", but use your own words)? [type_of_study]
#> 
#> To specify preregistration content, you can use the following command:
#> 
#> preregr::prereg_specify(examplePrereg_1, tasks_and_roles = "The content to
#> specify");
#> 
#> Note that in this example, the item identifier for the first item was used;
#> replace this with the item identifiers for the other items to specify content
#> for those (shown between square brackets after each item's description).
#>