Learn R Programming

rbi (version 0.6.0)

bi_read: Bi Read

Description

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.

Usage

bi_read(read, vars, dims, missval.threshold, coord_name, vector, thin, verbose)

Arguments

read
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
vars
variables to read; if not given, all will be read
dims
factors for dimensions
missval.threshold
upper threshold for the likelihood
coord_name
name of coord dimension (if any)
vector
if TRUE, will return results as vectors, not data.frames
thin
thinning (keep only 1/thin of samples)
verbose
if TRUE, will print variables as they are read

Value

list of results

Examples

Run this code
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