robyn_write | R Documentation |
robyn_write()
generates light JSON files with all the information
required to replicate Robyn models. Depending on user inputs, there are
3 use cases: only the inputs data, input data + modeling results data,
and input data, modeling results + specifics of a single selected model.
To replicate a model, you must provide InputCollect, OutputCollect, and,
if OutputCollect contains more than one model, the select_model.
robyn_write(
InputCollect,
OutputCollect = NULL,
select_model = NULL,
dir = OutputCollect$plot_folder,
add_data = TRUE,
export = TRUE,
quiet = FALSE,
pareto_df = NULL,
...
)
## S3 method for class 'robyn_write'
print(x, ...)
robyn_read(json_file = NULL, step = 1, quiet = FALSE, ...)
## S3 method for class 'robyn_read'
print(x, ...)
robyn_recreate(json_file, quiet = FALSE, ...)
InputCollect |
|
OutputCollect |
|
select_model |
Character. Which model ID do you want to export into the JSON file? |
dir |
Character. Existing directory to export JSON file to. |
add_data |
Boolean. Include raw dataset. Useful to recreate models with a single file containing all the required information (no need of CSV). |
export |
Boolean. Export outcomes into local files? |
quiet |
Boolean. Keep messages off? |
pareto_df |
Dataframe. Save all pareto solutions to json file. |
... |
Additional parameters to export into a custom Extras element. |
x |
|
json_file |
Character. JSON file name to read and import. |
step |
Integer. 1 for import only and 2 for import and output. |
(invisible) List. Contains all inputs and outputs of exported model.
Class: robyn_write
.
## Not run:
InputCollectJSON <- robyn_inputs(
dt_input = Robyn::dt_simulated_weekly,
json_file = "~/Desktop/RobynModel-1_29_12.json"
)
print(InputCollectJSON)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.