tidy_flows {isotracer} | R Documentation |
Build a tidy table with the flows for each iteration
Description
If neither n_per_chain
and n
are provided, all iterations are
used.
Usage
tidy_flows(
nm,
mcmc,
n_per_chain = NULL,
n = NULL,
n_grid = 64,
steady_state = FALSE,
dt = NULL,
grid_size = NULL,
at = NULL,
end = NULL,
use_cache = TRUE,
cores = NULL
)
Arguments
nm |
A |
mcmc |
The corresponding output from |
n_per_chain |
Integer, number of iterations randomly drawn per chain. Note that iterations are in sync across chains (in practice, random iterations are chosen, and then parameter values extracted for those same iterations from all chains). |
n |
Integer, number of iterations randomly drawn from |
n_grid |
Size of the time grid used to calculate trajectories |
steady_state |
Boolean (default: FALSE). If TRUE, then steady state compartment sizes are calculated for each iteration and steady state flows are calculated from those compartment sizes. |
dt , grid_size |
Time step size or grid points, respectively. |
at |
Timepoints at which the predictions should be returned. |
end |
Final timepoint used in the projections. |
use_cache |
Boolean, use cache for faster calculations? |
cores |
Number of cores to use for parallel calculations. Default is
|
Details
Warning: This function is still maturing and its interface and output might change in the future.
Value
A tidy table containing the mcmc iterations (chain, iteration,
parameters), the grouping variables from the network model and the
flows. The returned flow values are the average flow per unit of time
over the trajectory calculations (or steady state flows if
steady_state
is TRUE).
Examples
tf <- tidy_flows(aquarium_mod, aquarium_run, n_per_chain = 25, cores = 2)
tf
tfmcmc <- as.mcmc.list(tf)
plot(tfmcmc)