init_docs: Initialize documentation template for the R Markdown results...

View source: R/docs.R

init_docsR Documentation

Initialize documentation template for the R Markdown results report.

Description

Create documentation template (a series of .md files) to fill out for the R Markdown results report. If the experiment is provided, the documentation files can be found in the Experiment's results directory (see Experiment$get_save_dir()) under docs/. Otherwise, the documentation files can be found in the specified save_dir directory under docs/. The documentation files generated include objectives.md and .md files corresponding to DGPs, Methods, Evaluators, and Visualizers in the Experiment.

Usage

init_docs(experiment, save_dir)

Arguments

experiment

An Experiment object. If provided, documentation is created for all previously saved Experiments that are found in the directory given by experiment$get_save_dir(). If no Experiments have been previously saved under this directory, then the current experiment is saved to disk and used to create the documentation template.

save_dir

An optional directory in which to find previously saved Experiment objects. Documentation is created for these found Experiments. Not used if experiment is provided.

Value

The original Experiment object if provided. Otherwise, returns NULL.

Examples

## Not run: 
# create documentation template from an experiment (of class `Experiment`)
init_docs(experiment)

# or alternatively, create documentation template from a specific directory
init_docs(save_dir = experiment$get_save_dir())
## End(Not run)


Yu-Group/simChef documentation built on March 25, 2024, 3:22 a.m.