titles_and_footnotes_from_df: Read titles and footnotes from a dataframe

Description Usage Arguments Details Value Required Columns

View source: R/read_hf.R

Description

Reads a data frame with header/footnote information and attaches it to an rtf_doc object.The most effective way to use this function is to pass information to a custom reader for your process. See Details section for more information.

Usage

1
2
3
4
5
6
7
titles_and_footnotes_from_df(
  doc,
  from.df = NULL,
  from.file = NULL,
  reader = NULL,
  ...
)

Arguments

doc

A rtf_doc object to append header and footnote information.

from.df

A data.frame object with title and footnote information.

from.file

A file path to a file with title and footnote information.

reader

A function to read the data from the from.file argument.

...

Parameters passed to read_hf where they are processed and constructed into hf_line objects.

Details

Titles_and_footnotes_from_df allows you to attach titles and footnotes (as hf_line objects) from a data.frame. This data.frame could be a data.frame in your local environment, or read in from an external file. The best way to utilize this method is to create a custom reader function. This custom reader function is a function that you develop to:

Titles_and_footnotes_from_df allows you to pass arguments into the reader function, which gives you the capability to keep titles and footnotes for all of your outputs in a central file and pass a filtering option, or any additional parameters as necessary. For an example implementation, see our vignette.

Value

A rtf_doc object with header/footnote information attached.

Required Columns

The following columns are required fields in a data.frame passed to titles_and_footnotes_from_df:


pharmaRTF documentation built on Sept. 28, 2021, 5:08 p.m.