reportifyr: An R package to aid in the drafting of reports.
reportifyr.Rd
This pacakge aims to ease table, figure, and footnote insertion and formatting into reports.
reportifyr setup functions
initialize_report_project
: Createsreport
directory with shell, draft, scripts, final subdirectories and adds standard_footnotes.yaml to /report directory. Initializes python virtual environment through a subcall to initialize_python creates OUTPUTS/figures, OUTPUTS/tables, OUTPUTS/listings directoriesinitialize_python
: Creates virtual environment in options("venv_dir") if set or project root otherwise. Also installs python-docx and pyyaml packages.
Analysis output saving functions
ggsave_with_metadata
: Wrapper for saving ggplot that also creates metadata for plot objectsave_rds_with_metadata
: Wrapper for saveRDS that also creates metadata for tabular object and saves as rtfwrite_csv_with_metadata
: Wrapper for write.csv that also creates metadata for tabular object and saves as rtfsave_as_rtf
: Saves tabular object (.csv or flextable) as rtf. This is called within save_rds_with_metadata and write_csv_with_metadataformat_flextable
: Formats a tabular data object as a flextable with simple formatting.
metadata interaction functions
write_object_metadata
: Creates a metadata.json file for the input object path. Called within all analysis output saving functions.update_object_footnotes
: Used to update footnotes fields within object metadata json files.preview_metadata_files
: Generates a data frame of all object metadata within input directory and displays object, meta type, equations notes, abbreviations.preview_metadata
: Generates the metadata data frame of the singular input file.get_meta_type
: Generates meta_type object to allow user to see available meta_types in standard_footnotes.yaml within report directoryget_meta_abbrevs
: Generates meta_abbrev object to allow user to see available abbreviations in standard_footnotes.yaml within report directory.
Document interaction functions
add_tables
: Adds tables into the word documentadd_footnotes
: Adds footnotes for figures and tablesadd_plots
: Adds plots into the word documentremove_tables_figures_footnotes
: Removes all tables, figures, and footnotes associated with a magic string {rpfy}:object.extremove_magic_strings
: Removes all magic strings from a document cutting its tie to reportifyr but producing a final document.remove_bookmarks
: Removes all bookmarks from document
Report building function
build_report
: Wrapper function to remove old tables, figures, and footnotes and adds new ones. Calls remove_tables_figures_footnotes, make_doc_dirs, add_plots, add_tables, add_footnotesfinalize_document
: Wrapper function to remove magic strings and bookmarks from document.
Utility functions
make_doc_dirs
: FILL INvalidate_object
: FILL IN
Author
Maintainer: Jacob Dumbleton jacob@a2-ai.com
Authors:
Matthew Smith matthews@a2-ai.com
Theodoros Papathanasiou theo.x.papathanasiou@gsk.com
Tarjinder Sahota tarjinder.z.sahota@gsk.com
Devin Pastoor devin@a2-ai.com
Agnes Kim agnes@a2-ai.com
Anne Zheng anne@a2-ai.com
Jenna Johnson jenna@a2-ai.com
Fernando Carreno fernando.o.carreno@gsk.com
Other contributors:
Kashyap Patel kashyap.x.patel@gsk.com [contributor]
Maxwell Chirehwa maxwell.t.chirehwa@gsk.com [contributor]
Wesley Cummings wes@a2-ai.com [contributor]
Elizabeth LeBeau elizabeth@a2-ai.com [contributor]