
Convert a codebook specification to PDF
Source:R/template_codebook_to_pdf.R
template_codebook_to_pdf.RdUse this function to export your codebook specification to a PDF file. To embed it in an R Markdown file, use !!! CREATE rock::knit_codebook() !!!
Usage
template_codebook_to_pdf(
x,
file,
author = NULL,
headingLevel = 1,
silent = rock::opts$get("silent")
)Arguments
- x
The codebook object (as produced by a call to
codebook_fromSpreadsheet()).- file
The filename to save the codebook to.
The author to specify in the PDF.
- headingLevel
The level of the top-most headings.
- silent
Whether to be silent or chatty.
Examples
# \donttest{
### Use a temporary file to write to
tmpFile <- tempfile(fileext = ".pdf");
### Load an example codebook
data("exampleCodebook_1", package = "rock");
rock::template_codebook_to_pdf(
exampleCodebook_1,
file = tmpFile
);
#> Error in `[.data.frame`(x$examples, x$examples$code_id == currentCodeId, c("example_fragment", "core_or_edge", "hit_or_miss", "example_explanation")): undefined columns selected
# }