summariseIsotopeData: Function that summarises a data frame containing stable...

View source: R/summariseIsotopeData.R

summariseIsotopeDataR Documentation

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,
  ...
)

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.

Value

a data frame with the summary of the data frame.

Examples

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

tRophicPosition documentation built on Dec. 28, 2022, 2:27 a.m.