Skip to contents

Run one report multiple times with different sets of parameters.

Usage

orderly_batch(name = NULL, parameters = NULL, ...)

Arguments

name

Name of the report to run (see orderly_list()). A leading src/ will be removed if provided, allowing easier use of autocomplete. Alternatively, the default of NULL is useful if you have already set the working directory to be the source directory.

parameters

Data frame of parameters passed to report. Each row represents a parameter set to be passed to one report run.

...

Additional args passed to orderly_run()

Value

List of ids of newly created reports

See also

orderly_run() for details of report running

Examples


path <- orderly::orderly_example("demo")
params <- data.frame(nmin = c(0.2, 0.25))
ids <- orderly::orderly_batch("other", params, root = path)
#> [ name       ]  other
#> [ id         ]  20220118-093835-fc921732
#> [ sources    ]  functions.R
#> [ parameter  ]  nmin: 0.2
#> [ start      ]  2022-01-18 09:38:36
#> [ data       ]  source => extract: 19 x 2
#> [ parameter  ]  nmin: 0.2
#> 
#> > extract$number <- extract$number + rnorm(1)
#> 
#> > write.csv(extract, "summary.csv", row.names = TRUE)
#> 
#> > png("graph.png")
#> 
#> > par(mar = c(15, 4, 0.5, 0.5))
#> 
#> > do_plot(extract)
#> 
#> > dev.off()
#> agg_png 
#>       2 
#> [ end        ]  2022-01-18 09:38:36
#> [ elapsed    ]  Ran report in 0.5642681 secs
#> [ artefact   ]  summary.csv: 08a4566d063098080bfd318f675926f2
#> [ ...        ]  graph.png: 10bdaaf1d723865acc32700a43b5d061
#> [ name       ]  other
#> [ id         ]  20220118-093836-cdf96f14
#> [ sources    ]  functions.R
#> [ parameter  ]  nmin: 0.25
#> [ start      ]  2022-01-18 09:38:36
#> [ data       ]  source => extract: 19 x 2
#> [ parameter  ]  nmin: 0.25
#> 
#> > extract$number <- extract$number + rnorm(1)
#> 
#> > write.csv(extract, "summary.csv", row.names = TRUE)
#> 
#> > png("graph.png")
#> 
#> > par(mar = c(15, 4, 0.5, 0.5))
#> 
#> > do_plot(extract)
#> 
#> > dev.off()
#> agg_png 
#>       2 
#> [ end        ]  2022-01-18 09:38:36
#> [ elapsed    ]  Ran report in 0.04638195 secs
#> [ artefact   ]  summary.csv: 96f402853ce06d5ef44a98c9cdb67573
#> [ ...        ]  graph.png: b3638caebfaa4c7c2a23d696fd33dff1