Initializing reportifyr
Loading reportifyr
On first interaction, reportifyr
loads with a message specifying options for
Python
setup. These options may be altered to designate where the Python
virtual
environment (.venv
) is created and which versions of Python
, python-docx
,
and PyYAML
are used. Or in most cases, these options may be left unset and
default values will be used.
library(reportifyr)
── Needed reportifyr options ───────────────────────────────────────────────────✖ options('venv_dir') is not set. venv will be created in Project rootℹ Please set all options for package to work.── Optional version options ────────────────────────────────────────────────────▇ options('uv.version') is not set. Default is 0.5.1▇ options('python.version') is not set. Default is system version▇ options('python-docx.version') is not set. Default is 1.1.2▇ options('pyyaml.version') is not set. Default is 6.0.2
Initializing A New Report Project
The first step in initializing reportifyr
is to call the initialize_report_project()
function. This function performs several tasks - it creates all needed subdirectories
for saving output figures and tables (artifacts), establishes the report
subdirectory,
and copies a standard_footnotes.yaml
file into the report
subdirectory that
can be used to save standardized footnote definitions. Additionally, it configures
the required Python
dependencies within a .venv
subdirectory to ensure the
Python
components of the reportifyr
package function correctly.
A directory must be specified in the initialize_report_project()
function
(typically the project root directory) where reportifyr
will search for certain
subdirectories. If these subdirectories are not found, the initialize_report_project()
function will create them automatically:
initialize_report_project(project_dir = here::here())
Initializing Multiple Reports
If you wish to create a nested directory structure (for multiple reports per project
directory), please set the venv_dir
to an appropriate path/to/dir
using options()
and then provide the same path/to/dir
as the project_dir
for initialize_report_project()
:
options("venv_dir" = here::here("path/to/dir"))
initialize_report_project(project_dir = here::here("path/to/dir"))