tfl_report() is the document half of a report definition: the page,
the running header and footer, the titles and footnotes, and the
table's pages — an rtfreporter::table_plan() or anything rtfreporter::rtf_tables() takes —
in one rtfreporter::rtf_document() ready for rtfreporter::generate_rtfreport(). The document
carries its program, so {PROGRAM} needs nothing more, and its file
(tfl_report_path(): rtf_document(file = )), so generate_rtfreport(doc)
writes there; a path given to it wins. A YAML report's file needs its
study.
Arguments
- spec
A report definition (
tfl_read_report_spec()) narrowed to one report, or the path(s) to read it from; or a report of the YAML spec (tfl_output(), resolved:tfl_resolve_output()), itspage:the calls –rtf_page,rtf_default_format,rtf_document,rtf_tables/rtf_figures,rtf_titles,rtf_footnotes, each its arguments, and the lines ofheader,footer,titles,footnotesand thetokens.- output_id
The report, when
specis a path or still defines several.- content
The report's content: an
rtfreporter::table_plan()orrtftablepages for a table or listing, figures for atype = figurereport.- study
For a YAML report: the study (
tfl_read_study_spec()), for its program (the TOC'sprogram, elsesettings: program, insettings: program_dir), and where the report's titles and footnotes print:settings: titles_atheader(the running header, after the study's lines) ortitles(above the table),footnotes_atfooter(the running footer, before the study's lines) orfootnotes(below the table); not set, above and below the table.
Details
spec <- tfl_read_report_spec(c("report.xlsx", "tables.xlsx"), output_id = id)
plan <- ard |> normalize_ard() |> tfl_table_plan(spec)
generate_rtfreport(tfl_report(spec, content = plan)) # to tfl_report_path(spec)The table engine
The ARD functions and the plan are rtfreporter's:
help("ard-tables", package = "rtfreporter").