Description Usage Arguments Details Value Required Columns
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.
1 2 3 4 5 6 7 | titles_and_footnotes_from_df(
doc,
from.df = NULL,
from.file = NULL,
reader = NULL,
...
)
|
doc |
A |
from.df |
A |
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 |
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:
Read a source file into a data.frame
Preprocess as necessary to keep only necessary records and variables
Ensure that variables are the correct data type
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.
A rtf_doc
object with header/footnote information attached.
The following columns are required fields in a data.frame passed to titles_and_footnotes_from_df:
type(character - 'title' or 'footnote')
text1(character)
text2(character)
align(character - left, right, center, or split)
bold(logical)
italic(logical)
font(character)
index(numeric)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.