Learn R Programming

rbi (version 0.9.1)

attach_file: Attach a new file to a libbi object

Description

Adds an (output, obs, etc.) file to a libbi object. This is useful to recreate a libbi object from the model and output files of a previous run

Usage

# S3 method for libbi
attach_file(x, file, data, force = FALSE, ...)

Arguments

x

a libbi object

file

the type of the file to attach, one of "output", "obs", "input" or "init"

data

name of the file to attach, or a list of data frames that contain the outputs

force

attach the file even if one like this already exists in the libbi object

...

ignored

Examples

Run this code
# NOT RUN {
bi <- libbi(model = system.file(package="rbi", "PZ.bi"))
example_output_file <- system.file(package="rbi", "example_output.nc")
bi <- attach_file(bi, "output", example_output_file)
# }

Run the code above in your browser using DataLab