Learn R Programming

preregr (version 0.2.9)

prereg_spec_to_pdf: 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")
)

Value

x, invisibly

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.

Examples

Run this code
### 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
  );
}

Run the code above in your browser using DataLab