| prepare_run_context | R Documentation |
First step of the artma() pipeline: resolve the output
directory, open the run's output-file capture, and produce the prepared
data frame. Either loads the data through prepare_data() or, when a data
frame is supplied, mirrors that pipeline's preprocess and compute phases on
it.
The returned context is what the run and summarize steps consume. The
capture frame it opens stays open on success: the caller owns it and must
close it (the run step does so when it writes the manifest, and artma()
registers an on.exit() fallback). A failure inside this function closes the
frame before propagating, so an aborted preparation leaves no dangling frame.
Callable repeatedly within one runtime_setup() extent, which is what the
session hub needs to re-prepare data from its menu loop.
prepare_run_context(data = NULL, methods = NULL)
data |
[data.frame, optional] Data frame to analyze. When |
methods |
[character, optional] The methods the run will invoke, used to decide which columns the data preparation must resolve. |
[list] The run context: df (the prepared data frame),
unwinsorized_df (a function returning the same frame prepared without
winsorization, built on first call and then kept; handed to methods that
register winsorize = FALSE), output_dir (the base output directory;
NULL when results are not saved, and replaced by the run's own
directory in execute_run()), save_results and capture (the open
output-file capture frame identifier).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.