R/prereg_spec_to_pdf.R
prereg_spec_to_pdf.Rd
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.
prereg_spec_to_pdf(
x,
file,
author = NULL,
section = NULL,
headingLevel = 1,
silent = preregr::opts$get("silent")
)
The (pre)registration object (as produced by a call to
prereg_initialize()
).
The filename to save the (pre)registration to.
The author to specify in the PDF.
Optionally, one or multiple sections to include (if NULL
,
all sections are included).
The level of the top-most headings.
Whether to be silent or chatty.
x, invisibly
### 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
);
}