## Overview

The fishflux package provides a tool to model fluxes of C (carbon), N (nitrogen) and P (phosphorus) in fishes. It combines basic principles from elemental stoichiometry and metabolic theory. The package offers a user-friendly interface to apply the model. fishflux is ideal for fish ecologists wishing to predict ingestion, egestion and excretion to study fluxes of elements.

Main assets:

• Provides function to model fluxes of carbon, nitrogen and phosphorus for fishes
• Allows for the estimation of uncertainty, dpending on the uncertainy of the input parameters
• Provides some functions to help find parameters as inputs for the model
• Provides functions to extract and illustrate results

## Theoretical framework

For more information on the theoretical framework behind cnp_model_mcmc(), check out the paper.

First, make sure your R version is 3.4 or higher and you have rtools installed.

### GitHub

Please follow these steps to install the latest version of the package from Github. fishflux uses Markov Chain Monte Carlo simulations provided by stan. Therefore, the first step is to install rstan. It’s important to closely follow all the steps described on the page depending on your operating system, because rstan requires a functioning C++ compiler. Furthermore, fishflux depends on the package rstantools version 2.0.0 or higher. This means that if you already have an older version of rstantools installed, you will have to reinstall it, prior to the installation of fishflux.

Once you have your c++ compiler set up correctly, you are ready to install it from GitHub.

install.packages("devtools")
devtools::install_github("nschiett/fishflux", dependencies=TRUE)
library(fishflux)

### CRAN

fishflux is now available on CRAN:

install.packages("fishflux")
library(fishflux)

Note that if you are using a linux operating system, you still need a c++ compiler to install the package from CRAN. If you are using Windows or Mac, you can install a pre-compiled binary version and thus don’t need a compiler.

Another option is to download the source file available on github here.

install.packages(path_to_fishflux_file, repos = NULL, type = "source")
library(fishflux)

## Documentation

See package vignette for an introduction and help pages. For more information on the theoretical model see here.