prereg_knit_item_content: Knit the specified content for the items in a...

View source: R/prereg_knit_item_content.R

prereg_knit_item_contentR Documentation

Knit the specified content for the items in a (pre)registration into an Rmd file

Description

This function inserts the specified content for the items in a (pre)registration, or in one or more sections, into an R Markdown file.

Usage

prereg_knit_item_content(x, section = NULL, headingLevel = 2)

Arguments

x

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

section

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

headingLevel

The level to use for the top-most heading.

Value

x, invisibly

Examples

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

### Knit the contents of the "metadata" section
### as an R Markdown partial
examplePrereg_1 |>
  preregr::prereg_knit_item_content(
    section="metadata"
  );

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