View source: R/prereg_spec_to_pdf.R
| prereg_spec_to_pdf | R Documentation | 
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")
)
x | 
 The (pre)registration object (as produced by a call to
  | 
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   | 
headingLevel | 
 The level of the top-most headings.  | 
silent | 
 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
  );
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.