prereg_spec_to_pdf: Convert a (pre)registration specification to PDF

View source: R/prereg_spec_to_pdf.R

prereg_spec_to_pdfR Documentation

Convert a (pre)registration specification to PDF

Description

Use this function to export your (pre)registration specification to a PDF file. To embed it in an R Markdown file, use prereg_knit_item_content() instead.

Usage

prereg_spec_to_pdf(
  x,
  file,
  author = NULL,
  section = NULL,
  headingLevel = 1,
  silent = preregr::opts$get("silent")
)

Arguments

x

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

file

The filename to save the (pre)registration to.

author

The author to specify in the PDF.

section

Optionally, one or multiple sections to include (if NULL, all sections are included).

headingLevel

The level of the top-most headings.

silent

Whether to be silent or chatty.

Value

x, invisibly

Examples

### Use a temporary file to write to
tmpFile <- tempfile(fileext = ".pdf");

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

### Only run this if you have a functional LaTeX installation
if (FALSE) {
  preregr::prereg_spec_to_pdf(
    examplePrereg_1,
    file = tmpFile
  );
}

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