powered by
This function reads all variable from a NetCDF file or the output of a libbi object. The file can be specified as a string to the filepath, in which case a NetCDF connection is opened, or directly as a NetCDF connection.
libbi
bi_read(x, vars, dims, model, type, missval.threshold, coord_name, vector, thin, verbose, clear_cache)
either a path to a NetCDF file, or a NetCDF connection created using nc_open, or a libbi object from which to read the output
nc_open
variables to read; if not given, all will be read
factors for dimensions
model file or a bi_model object (if x is not a libbi object)
bi_model
x
vector of types of variable to read (out of "param", "state", "noise", "obs"). This needs 'x' to be a libbi object or model to be specified
model
upper threshold for the likelihood
name of coord dimension (if any)
if TRUE, will return results as vectors, not data.frames
thinning (keep only 1/thin of samples)
if TRUE, will print variables as they are read
if TRUE, will clear the cache and re-read the file even if cached data exists
list of results
# NOT RUN { example_output_file <- system.file(package="rbi", "example_output.nc") d <- bi_read(example_output_file) # }
Run the code above in your browser using DataLab