Package: isotracer 1.1.9

Matthieu Bruneaux

isotracer: Isotopic Tracer Analysis Using MCMC

Implements Bayesian models to analyze data from tracer addition experiments. The implemented method was originally described in the article "A New Method to Reconstruct Quantitative Food Webs and Nutrient Flows from Isotope Tracer Addition Experiments" by López-Sepulcre et al. (2020) <doi:10.1086/708546>.

Authors:Andrés López-Sepulcre [aut], Matthieu Bruneaux [aut, cre]

isotracer_1.1.9.tar.gz
isotracer_1.1.9.zip(r-4.7-x86_64)isotracer_1.1.9.zip(r-4.7-arm64)isotracer_1.1.9.zip(r-4.6-x86_64)isotracer_1.1.9.zip(r-4.6-arm64)
isotracer_1.1.9.tar.gz(r-4.7-arm64)isotracer_1.1.9.tar.gz(r-4.7-x86_64)isotracer_1.1.9.tar.gz(r-4.6-arm64)isotracer_1.1.9.tar.gz(r-4.6-x86_64)
isotracer_1.1.9.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
isotracer/json (API)

# Install 'isotracer' in R:
install.packages('isotracer', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://gitlab.com/matthieu-bruneaux/isotracer

Uses libs:
  • onetbb– Parallelism library for C++
  • c++– GNU Standard C++ Library v3
Datasets:
  • aquarium_mod - A simple aquarium network model, ready to run
  • aquarium_run - An MCMC run from a simple aquarium network model
  • eelgrass - Eelgrass phosphate incorporation data
  • lalaja - Dataset for nitrogren fluxes in a Trinidadian mountain stream
  • li2017 - Protein degradation in Arabidopsis plants
  • li2017_counts - Protein degradation in Arabidopsis plants
  • li2017_prots - Protein degradation in Arabidopsis plants
  • trini_mod - Network model for nitrogen fluxes in Trinidadian streams

On CRAN:

Conda:

onetbbcpp

3.85 score 119 downloads 61 exports 58 dependencies

Last updated from:896ef9bae1. Checks:8 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE315
linux-devel-x86_64NOTE386
source / vignettesOK421
linux-release-arm64NOTE313
linux-release-x86_64NOTE336
windows-devel-arm64NOTE427
windows-devel-x86_64NOTE441
windows-release-arm64NOTE468
windows-release-x86_64NOTE385
wasm-releaseOK237

Exports:%>%add_covariatesadd_pulse_eventas_tbl_graphas.mcmc.listavailable_priorscalculate_steady_statecompsconstant_pdelta2propdicexponential_pfilterfilter_by_groupgamma_pggflowsggtopogroupshcauchy_pmcmc_heatmapmissing_priorsnew_networkModelnormal_pparamsposterior_predictpriorsprojectprop_familyprop2deltaquick_sankeyrun_mcmcsample_fromsample_from_priorsample_paramssankeyscaled_beta_pselectset_half_lifeset_initset_obsset_paramsset_priorset_priorsset_prop_familyset_size_familyset_splitset_steadyset_toposize_familystanfit_to_named_mcmclisttidy_datatidy_dpptidy_flowstidy_mcmctidy_posterior_predicttidy_steady_statestidy_trajectoriestopotraceplotuniform_pvarnames

Dependencies:abindbackportsBHcallrcheckmateclicodacpp11data.tabledescdistributionaldplyrfarvergenericsggplot2gluegridExtragtableinlineisobandlabelinglatex2explatticelifecycleloomagrittrmatrixStatsnumDerivotelpillarpkgbuildpkgconfigposteriorprocessxpspurrrQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsS7scalesStanHeadersstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr

Calculating derived parameters
Preparation | Selecting primary parameters

Last update: 2026-09-20
Started: 2021-09-27

Case study: Trinidadian streams (Collins et al. 2016)
Experiment and data | Building the model | Network topology | Initial conditions and observations | Allowing for inhomogeneous compartments | Drip regime | Setting the distribution family for observed sizes | Running the model | Setting priors | Posterior predictive fits | Alternative model | Model comparison | Sankey plot | To go further

Last update: 2026-09-20
Started: 2021-09-27

Defining pulse or drip events
Modelling pulse events | Data preparation | Building the network model | Specifying a pulse event | Running the MCMC | Modelling drip events | Building the model | Specifying a drip event

Last update: 2026-09-20
Started: 2021-09-27

Handling replication
Introduction | Data preparation | Building the network model | Running the MCMC | To go further

Last update: 2026-09-20
Started: 2021-09-27

How to simulate experiments
Creating a network model | Building the network model | Setting parameter values | Generating simulated data | Fitting a model on the simulated data | Run with ten time points | Run with three time points | Comparison | To go further

Last update: 2026-09-20
Started: 2021-09-27

Including fixed effects of covariates
Data preparation | Building the model | Specifying fixed effect covariates | Running the MCMC | Interpreting the output

Last update: 2026-09-20
Started: 2021-09-27

MCMC output format
The default format: mcmc.list | How to convert the default output to a table? | How to calculate derived parameters? | How to combine derived parameters? | A more detailed format: stanfit

Last update: 2026-09-20
Started: 2021-09-27

Post-run diagnostics and analyses
Reminder: what is the result format returned by run_mcmc()? | General diagnostics | Trace plot | Gelman and Rubin's convergence diagnostic | Predicted trajectories | Post-run analyses | Parameter estimates | Parameter correlations | Extracting parameters, trajectories and flows

Last update: 2026-09-20
Started: 2021-09-27

Posterior predictive checks
Preparation | Posterior predictive check | Trajectories prediction | Tidy posterior predictions

Last update: 2026-09-20
Started: 2021-09-27

Prior predictive checks

Last update: 2026-09-20
Started: 2021-09-27

Quick start
Overview: modelling of tracer experiments | The isotracer model in a nutshell | What is needed to model a foodweb? | A toy example: a small aquarium | The data | Building the model, one step at a time | Running the model

Last update: 2026-09-20
Started: 2021-09-27

Setting steady-state compartments
Data preparation | Building the network model | Specifying steady-state compartments | Running the MCMC

Last update: 2026-09-20
Started: 2021-09-27

Testing parameter identifiability
A problematic design | An improved design

Last update: 2026-09-20
Started: 2021-09-27

Units and priors
Parameter units | Uptake rates | Loss rates | Active portions | Coefficients of variations | Choosing priors | Setting priors

Last update: 2026-09-20
Started: 2021-09-27

Readme and manuals

Help Manual

Help pageTopics
The 'isotracer' packageisotracer-package isotracer
Subset method for 'networkModelStanfit' objects[.networkModelStanfit
Add fixed effects of one or several covariates to some parameters.add_covariates
Register a pulse event on one of the compartment of a topologyadd_pulse_event
A simple aquarium network model, ready to runaquarium_mod
An MCMC run from a simple aquarium network modelaquarium_run
Generic for as_tbl_graph()as_tbl_graph
Convert a network topology to a tbl_graphas_tbl_graph.topology
Convert a 'tidy_flows' object to an 'mcmc.list'as.mcmc.list.tidy_flows
Convert a 'tidy_steady_states' object to an 'mcmc.list'as.mcmc.list.tidy_steady_states
List the available priors for model parametersavailable_priors
Combine mcmc.list objectsc.mcmc.list
Calculate steady-state compartment sizes for a networkcalculate_steady_state
Return the compartments of a network modelcomps
Define a fixed-value priorconstant_p
Convert delta notation to proportion of heavy isotopedelta2prop
Calculate DIC from a model outputdic
Eelgrass phosphate incorporation data (McRoy & Barsdate 1970)eelgrass
Define an exponential priorexponential_p
Filter (alias for filter function from dplyr)filter
Filter a tibble based on the "group" columnfilter_by_group
Filter method for output of tidy_data_and_posterior_predict()filter.ppcNetworkModel
Pretty formatting of a 'prior' objectformat.prior
Pretty formatting of a 'prior_tibble' objectformat.prior_tibble
Define a gamma priorgamma_p
A quick-and-dirty way of visualizing relative flows in a networkggflows
Plot a topologyggtopo
Plot a network topologyggtopo.networkModel
Plot a topologyggtopo.topology
Get the grouping for a 'networkModel' objectgroups.networkModel
Define a half-Cauchy prior (on [0;+Inf])hcauchy_p
Dataset for nitrogren fluxes in a Trinidadian mountain stream (Collins 2016)lalaja
Protein degradation in Arabidopsis plants (Li et al. 2017)li2017 li2017_counts li2017_prots
Math generics for mcmc.list objectsMath.mcmc.list
Draw a heatmap based on the correlations between parametersmcmc_heatmap
Get a table with parameters which are missing priorsmissing_priors
Create an empty network modelnew_networkModel
Define a truncated normal prior (on [0;+Inf])normal_p
Function used for displaying 'prior' object in tibblesobj_sum.prior
Ops generics for 'mcmc.list' objectsOps.mcmc.list
Implementation of the '==' operator for priorsOps.prior
Ops generics for 'topology' objectsOps.topology
Return the parameters of a network modelparams
Function used for displaying 'prior' object in tibblespillar_shaft.prior
Plot observations/trajectories/predictions from a network modelplot.networkModel
Plot output from 'split_to_unit_plot'plot.ready_for_unit_plot
Draw from the posterior predictive distribution of the model outcomeposterior_predict
Draw from the posterior predictive distribution of the model outcomeposterior_predict.networkModelStanfit
Add a column with predictions from a fitpredict.networkModel
Print method for 'networkModel' objectsprint.networkModel
Pretty printing of a 'prior' objectprint.prior
Pretty printing of a 'prior_tibble' objectprint.prior_tibble
Pretty printing of a 'topology' objectprint.topology
Return the tibble containing the priors of a networkModelpriors
Calculate the trajectories of a network modelproject
Return the distribution family for observed proportionsprop_family
Convert isotopic proportions to delta valuesprop2delta
Draw a Sankey plot with basic defaultsquick_sankey
Run a MCMC sampler on a network model using Stanrun_mcmc
Generate samples from a network modelsample_from
Sample from a prior objectsample_from_prior
Sample parameter values from priorssample_params
Draw a Sankey plot for a network and estimated flowssankey
Define a beta prior (on [0;scale])scaled_beta_p
Select parameters based on their namesselect.mcmc.list
Set the half-life for radioactive tracersset_half_life
Set initial conditions in a network modelset_init
Set observations in a network modelset_obs
Set the parameters in a network modelset_params
Set prior(s) for a network modelset_prior set_priors
Set the distribution family for observed proportionsset_prop_family
Set the distribution family for observed sizesset_size_family
Flag some network compartments as being split compartmentsset_split
Flag some network compartments as being in a steady stateset_steady
Set the topology in a network model.set_topo
Return the distribution family for observed sizessize_family
Convert a Stanfit object to a nicely named mcmc.list objectstanfit_to_named_mcmclist
Extract data from a networkModel object into a tidy tibble.tidy_data
Prepare tidy data and posterior predictionstidy_dpp
Build a tidy table with the flows for each iterationtidy_flows
Extract a tidy output from an mcmc.listtidy_mcmc
Draw from the posterior predictive distribution of the model outcometidy_posterior_predict
Build a tidy table with the calculated steady states for each iterationtidy_steady_states
Build a tidy table with the trajectories for each iterationtidy_trajectories
Return the list of topologies, or a unique topology if all identicaltopo
Plot mcmc.list objectstraceplot
Network model for nitrogen fluxes in Trinidadian streams (Collins et al. 2016)trini_mod
Function used for displaying 'prior' object in tibblestype_sum.prior
Define a uniform prioruniform_p