Learn R Programming

isotracer: an R package for the analysis of tracer addition experiments

Isotope tracer addition experiments are used to answer a wide variety of biological, ecological and evolutionary questions. In these experiments, a labeled element is injected into a biological system and its fate is traced throughout the system to estimate the flux of matter across compartments. Tracer additions can be used across all levels of biological organization from cells and tissues, to organisms and ecosystems. The isotracer package provides tools to analyze data from such experiments.

Getting started

The recommended way to install the package is to get the latest version from CRAN:

install.packages("isotracer")

The documentation for the latest stable version is available online. Start with the Quick Start tutorial!

If you are feeling adventurous, you might want to install the latest development version from GitLab. It might have new features that the stable version on CRAN doesn’t have yet, but it might also be less stable:

devtools::install_gitlab("matthieu-bruneaux/isotracer")

How to cite the package

Running citation("isotracer") will return two references you can use if you want to cite isotracer.

The first reference is the paper describing the original method:

  • López-Sepulcre A, Bruneaux M, Collins SM, El-Sabaawi R, Flecker AS, Thomas SA (2020). “A new method to reconstruct quantitative food webs and nutrient flows from isotope tracer addition experiments.” The American Naturalist, 195(6), 964-985. doi: 10.1086/708546 (URL: https://doi.org/10.1086/708546).

The second reference is the paper introducing isotracer itself:

  • Bruneaux M, López-Sepulcre A (2022). “isotracer: An R package for the analysis of tracer addition experiments.” Methods in Ecology and Evolution, 13(5), 1119-1134. doi: 10.1111/2041-210X.13822 (URL: https://doi.org/10.1111/2041-210X.13822).

Contact

Copy Link

Version

Install

install.packages('isotracer')

Monthly Downloads

41

Version

1.1.9

License

GPL-3

Maintainer

Mattieu Bruneaux

Last Published

September 20th, 2026

Functions in isotracer (1.1.9)

as_tbl_graph

Generic for as_tbl_graph()
comps

Return the compartments of a network model
new_networkModel

Create an empty network model
as_tbl_graph.topology

Convert a network topology to a tbl_graph
normal_p

Define a truncated normal prior (on [0;+Inf])
ggtopo.networkModel

Plot a network topology
print.networkModel

Print method for networkModel objects
ggtopo

Plot a topology
quick_sankey

Draw a Sankey plot with basic defaults
select.mcmc.list

Select parameters based on their names
print.prior

Pretty printing of a prior object
set_half_life

Set the half-life for radioactive tracers
reexports

Objects exported from other packages
filter.ppcNetworkModel

Filter method for output of tidy_data_and_posterior_predict()
constant_p

Define a fixed-value prior
ggflows

A quick-and-dirty way of visualizing relative flows in a network
posterior_predict.networkModelStanfit

Draw from the posterior predictive distribution of the model outcome
predict.networkModel

Add a column with predictions from a fit
gamma_p

Define a gamma prior
eelgrass

Eelgrass phosphate incorporation data (McRoy & Barsdate 1970)
dic

Calculate DIC from a model output
scaled_beta_p

Define a beta prior (on [0;scale])
plot.networkModel

Plot observations/trajectories/predictions from a network model
priors

Return the tibble containing the priors of a networkModel
pillar_shaft.prior

Function used for displaying prior object in tibbles
sankey

Draw a Sankey plot for a network and estimated flows
project

Calculate the trajectories of a network model
filter_by_group

Filter a tibble based on the "group" column
delta2prop

Convert delta notation to proportion of heavy isotope
hcauchy_p

Define a half-Cauchy prior (on [0;+Inf])
params

Return the parameters of a network model
isotracer-package

The 'isotracer' package
print.prior_tibble

Pretty printing of a prior_tibble object
posterior_predict

Draw from the posterior predictive distribution of the model outcome
obj_sum.prior

Function used for displaying prior object in tibbles
missing_priors

Get a table with parameters which are missing priors
mcmc_heatmap

Draw a heatmap based on the correlations between parameters
set_steady

Flag some network compartments as being in a steady state
tidy_trajectories

Build a tidy table with the trajectories for each iteration
set_split

Flag some network compartments as being split compartments
plot.ready_for_unit_plot

Plot output from split_to_unit_plot
topo

Return the list of topologies, or a unique topology if all identical
print.topology

Pretty printing of a topology object
stanfit_to_named_mcmclist

Convert a Stanfit object to a nicely named mcmc.list object
set_init

Set initial conditions in a network model
set_obs

Set observations in a network model
set_topo

Set the topology in a network model.
tidy_posterior_predict

Draw from the posterior predictive distribution of the model outcome
size_family

Return the distribution family for observed sizes
tidy_steady_states

Build a tidy table with the calculated steady states for each iteration
prop2delta

Convert isotopic proportions to delta values
lalaja

Dataset for nitrogren fluxes in a Trinidadian mountain stream (Collins 2016)
li2017

Protein degradation in Arabidopsis plants (Li et al. 2017)
type_sum.prior

Function used for displaying prior object in tibbles
[.networkModelStanfit

Subset method for networkModelStanfit objects
uniform_p

Define a uniform prior
run_mcmc

Run a MCMC sampler on a network model using Stan
sample_from_prior

Sample from a prior object
sample_from

Generate samples from a network model
sample_params

Sample parameter values from priors
tidy_dpp

Prepare tidy data and posterior predictions
tidy_mcmc

Extract a tidy output from an mcmc.list
tidy_data

Extract data from a networkModel object into a tidy tibble.
tidy_flows

Build a tidy table with the flows for each iteration
prop_family

Return the distribution family for observed proportions
set_size_family

Set the distribution family for observed sizes
set_prop_family

Set the distribution family for observed proportions
set_params

Set the parameters in a network model
set_prior

Set prior(s) for a network model
traceplot

Plot mcmc.list objects
trini_mod

Network model for nitrogen fluxes in Trinidadian streams (Collins et al. 2016)
add_pulse_event

Register a pulse event on one of the compartment of a topology
Ops.mcmc.list

Ops generics for mcmc.list objects
as.mcmc.list.tidy_steady_states

Convert a tidy_steady_states object to an mcmc.list
as.mcmc.list.tidy_flows

Convert a tidy_flows object to an mcmc.list
aquarium_mod

A simple aquarium network model, ready to run
add_covariates

Add fixed effects of one or several covariates to some parameters.
Math.mcmc.list

Math generics for mcmc.list objects
Ops.topology

Ops generics for topology objects
Ops.prior

Implementation of the '==' operator for priors
available_priors

List the available priors for model parameters
calculate_steady_state

Calculate steady-state compartment sizes for a network
exponential_p

Define an exponential prior
aquarium_run

An MCMC run from a simple aquarium network model
ggtopo.topology

Plot a topology
groups.networkModel

Get the grouping for a networkModel object
filter

Filter (alias for filter function from dplyr)
c.mcmc.list

Combine mcmc.list objects
format.prior

Pretty formatting of a prior object
format.prior_tibble

Pretty formatting of a prior_tibble object