get_titles_from_file {junco} | R Documentation |
Get Titles/Footers For Table From Sources
Description
Retrieves the titles and footnotes for a given table from a CSV/XLSX file or a data.frame.
Usage
get_titles_from_file(
id,
file = .find_titles_file(input_path),
input_path = ".",
title_df = .read_titles_file(file)
)
Arguments
id |
character. The identifier for the table of interest. |
file |
( |
input_path |
( |
title_df |
( |
Details
Retrieves the titles for a given output id (see below) and outputs
a list containing the title and footnote objects supported by
rtables. Both titles.csv and titles.xlsx (if readxl
is
installed) files are supported, with titles.csv being checked
first.
Data is expected to have `TABLE ID`, `IDENTIFIER`, and `TEXT` columns, where `IDENTIFIER` has the value `TITLE` for a title and `FOOT*` for footer materials where `*` is a positive integer. `TEXT` contains the value of the title/footer to be applied.
Value
List object containing: title, subtitles, main_footer, prov_footer
for the table of interest. Note: the subtitles and prov_footer are
currently set to NULL. Suitable for use with set_titles()
.
See Also
Used in all template script