Skip to contents

Package-wide helper used by the vignettes to persist a table to a per-vignette res/res_<topic>/ folder. Writes a .tex file and, when a data frame is supplied, a companion .csv. Saving is gated by bl_save so a vignette can keep all outputs off by default and flip individual tables on through its ls_save_res control list.

Usage

ffp_save_res_table(kbl_latex, name, spt_res, df = NULL, bl_save = TRUE)

Arguments

kbl_latex

A kableExtra/knitr_kable object or character vector built with format = "latex"; coerced with as.character() before writing.

name

File stem (no extension) for the <name>.tex / <name>.csv files.

spt_res

Destination folder; created recursively if missing.

df

Optional data frame; when supplied, also written as <name>.csv.

bl_save

If FALSE, do nothing (control switch). Default TRUE.

Value

Invisibly NULL. Called for its side effect of writing files.

Author

Fan Wang, http://fanwangecon.github.io