Learn R Programming

rbi (version 0.6.0)

libbi_run: Using the LibBi wrapper to launch LibBi

Description

The method run of an instance of libbi allows to launch libbi with a particular set of command line arguments.

Arguments

options
list of additional arguments to pass to the call to libbi
add_options
deprecated, replaced by options
log_file_name
path to a file to text file to report the output of libbi
init
initialisation of the model, either supplied as a list of values and/or data frames, or a (netcdf) file name, or a libbi object which has been run (in which case the output of that run is used as input)
input
input of the model, either supplied as a list of values and/or data frames, or a (netcdf) file name, or a libbi object which has been run (in which case the output of that run is used as input)
obs
observations of the model, either supplied as a list of values and/or data frames, or a (netcdf) file name, or a libbi object which has been run (in which case the output of that run is used as observations)
time_dim
The time dimension in any R objects that have been passed (init, input) and obs); if not given, will be guessed
...
any unrecognised options will be added to options

See Also

libbi

Examples

Run this code
bi_object <- libbi$new(client = "sample",
                       model = system.file(package="rbi", "PZ.bi"),
                       options = list(sampler = "smc2"))
## Not run: bi_object$run(options=list(nthreads = 1), verbose = TRUE)
if (bi_object$run_flag) {
  bi_file_summary(bi_object$output_file_name)
}

Run the code above in your browser using DataLab