Skip to contents

Knits an R Markdown file summarizing the results of an Experiment or set of Experiments. Outputs an R Markdown-generated html file. If experiment is provided, the results are saved in the Experiment's root results directory (see Experiment$get_save_dir()). Otherwise, the root results directory is taken to be that specified by save_dir. Note that create_rmd() will process and include results from all Experiments found under the root directory.

Usage

create_rmd(
  experiment,
  save_dir,
  open = TRUE,
  title = NULL,
  author = "",
  verbose = 2,
  quiet = TRUE,
  pretty = TRUE,
  eval_order = NULL,
  viz_order = NULL,
  ...
)

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.

open

If TRUE, open the R Markdown-generated html file in a web browser.

title

Character string. Title of the report. By default, this will be the name of the experiment if experiment is provided.

author

Character string of author names to display in knitted R Markdown document.

verbose

Level of verboseness (0, 1, 2) when knitting R Markdown. Default is 2.

quiet

Default is TRUE. See rmarkdown::render() for details.

pretty

Logical. Specifies whether or not to use pretty R Markdown results template or more barebones R Markdown results template. Default TRUE uses the pretty template. Set to FALSE to start from the barebones template, which can be helpful when using your own custom R Markdown theme.

eval_order

Vector of Evaluator names in their desired order for display. By default, the report will display the Evaluator results in the order that they were computed.

viz_order

Vector of Visualizer names in their desired order for display. By default, the report will display the Visualizer results in the order that they were computed.

...

Additional arguments to pass to rmarkdown::render(). Useful for applying a custom R Markdown output theme.

Value

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

Examples

if (FALSE) {
# create basic Rmd from an experiment (of class `Experiment`)
create_rmd(experiment)

# or alternatively, create basic Rmd from a specific directory
create_rmd(save_dir = experiment$get_save_dir())}