Learn R Programming

tRophicPosition (version 0.8.0)

summariseIsotopeData: Function that summarises a data frame containing stable isotope values (d13C and d15N) grouping by Species and FG columns

Description

A wrapper of plyr:ddply to summarise a data frame.

Usage

summariseIsotopeData(
  df = NULL,
  grouping = c("Species", "FG"),
  printSummary = FALSE,
  ...
)

Value

a data frame with the summary of the data frame.

Arguments

df

a data frame that contains the isotope values. It needs to have the following columns: d13C, d15N, Species and FG. Species stands for the scientific name (or common name), and FG stands for the functional group for each species. If the data frame does not have Species and FG columns, it will raise an error. If the columns change their names, they need to be stated as well in the grouping variable.

grouping

a vector with the name of the columns (variables) that will be used to summarize, and plot the data frame.

printSummary

logical value indicating whether the summary is printed.

...

optional arguments that are passed to the function for later use.

Examples

Run this code
data('Bilagay')
subset_CHI <- Bilagay[Bilagay[,'Location'] %in% 'CHI',]
summariseIsotopeData(subset_CHI, grouping = c('Spp', 'FG'))

Run the code above in your browser using DataLab