Skip to contents

Use this function to export a templated report for cognitive interviews. To embed it in an R Markdown file, use !!! CREATE rock::knit_codebook() !!!

Usage

template_ci_heatmap_1_to_pdf(
  x,
  file,
  title = "Cognitive Interview: Heatmap and Coded Fragments",
  author = NULL,
  caption = "Heatmap",
  headingLevel = 1,
  silent = rock::opts$get("silent")
)

Arguments

x

The codebook object (as produced by a call to parse_sources()).

file

The filename to save the codebook to.

title

The title to use.

author

The author to specify in the PDF.

caption

The caption for the heatmap.

headingLevel

The level of the top-most headings.

silent

Whether to be silent or chatty.

Value

x, invisibly

Examples

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

### Load an example CI
examplePath <- file.path(system.file(package="rock"), 'extdata');
parsedCI <- parse_source(file.path(examplePath,
                                   "ci_example_1.rock"));

rock::template_ci_heatmap_1_to_pdf(
  parsedCI,
  file = tmpFile
);
#> A new version of TeX Live has been released. If you need to install or update any LaTeX packages, you have to upgrade TinyTeX with tinytex::reinstall_tinytex(repository = "illinois").
#> Warning: running command ''tlmgr' search --file --global '/grffile.sty'' had status 1
#> ! LaTeX Error: File `grffile.sty' not found.
#> 
#> ! Emergency stop.
#> <read *> 
#> Error: LaTeX failed to compile /tmp/RtmpDUyFAE/file4b9ad47dd1e6e.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See file4b9ad47dd1e6e.log for more info.
# }