View source: R/loadIsotopeData.R
loadIsotopeData | R Documentation |
This function extracts only selected consumers/species with their respective baseline(s) and returns an isotopeData class object (or list). It is useful when there are a lot of information in a data frame and you want to calculate trophic position only for selected consumers in one or more communities.
loadIsotopeData( df = NULL, consumer = NULL, group = NULL, b1 = "Baseline 1", b2 = NULL, baselineColumn = "FG", consumersColumn = "FG", groupsColumn = NULL, d13C = "d13C", d15N = "d15N", deltaC = NULL, deltaN = NULL, seed = 666, ... )
df |
data frame containing raw isotope data with at least one grouping column. |
consumer |
string or character vector indicating which consumer/species will be extracted. |
group |
string or character vector indicating which group(s) will be extracted. |
b1 |
string or character vector indicating which baseline(s) will be extracted as baseline 1. |
b2 |
string or character vector indicating which baseline(s) will be extracted as baseline 2. |
baselineColumn |
string of the column where baselines are grouped. |
consumersColumn |
string of the column where species/consumer(s) are grouped. |
groupsColumn |
string of the column where groups/communities are grouped. |
d13C |
string indicating from which column extract d13C isotope values. |
d15N |
string indicating from which column extract d15N isotope values. |
deltaC |
vector of values with trophic discrimination factor for carbon. If NULL it will use Post's assumptions (56 values with 3.4 mean +- 0.98 sd). |
deltaN |
vector of values with trophic discrimination factor for nitrogen. If NULL it will use Post's assumptions (107 values with 0.39 mean +- 1.3 sd). |
seed |
numerical value to get reproducible results with trophic discrimination factors (because they are simulated each time this function is called). By default, is 3. |
... |
Additional arguments passed to this function. |
an isotopeData class object if one consumer and one group are selected. A list of isotopeData class objects if more than one consumer or more than one group are selected.
data("Bilagay") head(Bilagay) loadIsotopeData(df = Bilagay, consumer = "Bilagay", consumersColumn = "FG", group = c("CHI", "COL"), groupsColumn = "Location", b1 = "Benthic_BL", b2 = "Pelagic_BL", baselineColumn = "FG")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.