Title: | Foraminifera and Community Ecology Analyses |
---|---|
Description: | SHE, FORAM Index and ABC Method analyses and custom plot functions for community data. |
Authors: | Rodrigo Aluizio |
Maintainer: | Rodrigo Aluizio <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0-6 |
Built: | 2025-03-02 03:33:08 UTC |
Source: | https://github.com/godrigos/forams |
SHE, FORAM Index and ABC Method analyses and custom plot functions for community data.
Package: | forams |
Type: | Package |
Version: | 2.0-6 |
Date: | 2023-08-24 |
License: | GLP (>=2) |
Depends: | methods, vegan, permute |
This package always uses data frames with taxa as rows and sites or variables as columns. It also provides customizable plot functions to use with the objects resulting from the analyses, and randomly generated example datasets.
The analyses performed by this package are: SHE, FORAM Index and ABC Method.
Rodrigo Aluizio
Maintainer: Rodrigo Aluizio <[email protected]>
Buzas, M.A. & Hayek, L.A.C. (1998). SHE analysis for biofacies identification. Journal of Foraminiferal Research 28 (3), 233-239.
Hallock, P., Lidz, B.H., Cockey-Burkhard, E.M. & Donnelly, K.B. (2003). Foraminifera as bioindicators in coral reef assessment and monitoring: The foram index. Environmental monitoring and assessment 81, 221-238.
Warwick, R.M. (1986). A new method for detecting pollution effects on marine macrobenthic communities. Marine Biology 92 (4), 557-562.
Warwick, R.M., & Clarke, K.R. (1994). Relearning the ABC: taxonomic changes and abundance/biomass relationships in disturbed benthic communities. Marine Biology 118 (4), 739-744.
Wilson, B., Dawe, R., Gopee, A., Grant, S., Kissoon, A., Young, T., Noon, C., McLean, A. & Singh, K. (2010). Determining Boundaries between Abundance Biozones Using Minimal Equipment. International Journal of Ecology 2010, 1-14.
data(NB) data(Factors) data(LF) # ABC plot(abc(NB)) # FORAM Index plot(fi(LF, Factors)) # SHE plot(she(LF))
data(NB) data(Factors) data(LF) # ABC plot(abc(NB)) # FORAM Index plot(fi(LF, Factors)) # SHE plot(she(LF))
This function performs the ABC and W statistic calculation.
abc(df, Perm, confInt)
abc(df, Perm, confInt)
df |
a numeric data frame containing the abundance and biomass as columns and taxa as rows. NAs are not allowed. |
Perm |
the number of permutations to be realized for calculating the Confidence Interval. |
confInt |
the Confidence interval range (90%, 95% or 99%, any other values will cause an error). |
The function generates a list of cumulative percentage values of Abundance, Biomass and Biomass - Abundance for each taxon (Warwick 1986), which are used for W statistic (Warwick & Clarke 1994) calculation and posterior k-dominance curve plotting.
An abc
S4 object has the fallowing elements:
An abc slot with:
Accum.Abun |
The cumulative percentage of abundance contribution. |
Accum.Biomass |
The cumulative percentage of biomass contribution. |
BiAi |
Biomass - Abundance calculation results. |
and a W.Stat slot with:
W.Stat |
The result of the W statistic calculation and its Confidence Interval. |
The list elementes are ordered according to Accum.Abun
, but the calculation is based on the contribution decreasing order, independently of any of the variables or taxon.
Rodrigo Aluizio
Warwick, R.M. (1986). A new method for detecting pollution effects on marine macrobenthic communities. Marine Biology 92 (4), 557-562.
Warwick, R.M., & Clarke, K.R. (1994). Relearning the ABC: taxonomic changes and abundance/biomass relationships in disturbed benthic communities. Marine Biology 118 (4), 739-744.
data(NB) MyABC <- abc(NB) plot(MyABC)
data(NB) MyABC <- abc(NB) plot(MyABC)
"abc"
Class used to store "abc"
analysis objects.
Objects can be created by calls of the form new("abc", ...)
.
This class is composed by two slots, the first one stores a table with the abc analysis results and the second one the W Statistic result and its Confidence Interval.
abc
:Object of class "data.frame"
~~
W.Stat
:Object of class "numeric"
~~
signature(x = "abc")
: ...
Rodrigo Aluizio
See Also as abc
showClass("abc")
showClass("abc")
An example dataset defining factors levels to use with the fi
function.
data(Factors)
data(Factors)
A data frame with 29 observations on the following variable.
a factor with levels: Ph
, Po
and Ps
This dataset is an artificial random generated example. Unfortunately at the moment, due to authorship issues I can not present any real one. This may change in future versions.
data(Factors) summary(Factors)
data(Factors) summary(Factors)
This function implements the FORAM Index (FI) in community abundance datasets.
fi(df, groups)
fi(df, groups)
df |
a numerical data frame with samples as columns and taxa as rows. |
groups |
a three level grouping factor. |
his analysis is directed for health evaluation and monitoring of reef environments (Hallock et al. 2003) and it is based in foraminiferal total fauna methodology.
The taxa classification that determines the groups are originally based on genera, but species data from literature or experiments will be accepted as well. The grouping factor must be composed solely by Ps
(simbiont-bearing), Po
(opportunistic), or Ph
(other small heterotrophic) levels. NAs are not allowed.
The plot uses the axis
function, so a complete customization (i.e. side
) of the axes is not possible at this moment, and some other parameters may show improperly if changed.
A fi
object has the fallowing elements:
PlotOrder |
a numerical vector defining the sites plot order, only used for plotting. |
FI |
a numerical vector with the sites FORAM Index values. |
FI > 4 indicates environment conducive to reef growth (CRG), FI varying between 3 and 5 indicates environmental change (Coefficient of Variation > 0.1), 2 < FI < 4 indicates environment marginal for reef growth (MRG) and unsuitable for recovery and FI < 2 indicates stressed conditions unsuitable for reef growth (UGR).
For more details on other graphic prameters see plot.default
and par
.
Rodrigo Aluizio
Hallock, P., Lidz, B.H., Cockey-Burkhard, E.M. & Donnelly, K.B. (2003). Foraminifera as bioindicators in coral reef assessment and monitoring: The foram index. Environmental monitoring and assessment 81, 221-238.
data(LF) data(Factors) MyFI <- fi(LF, Factors) plot(MyFI)
data(LF) data(Factors) MyFI <- fi(LF, Factors) plot(MyFI)
"fi"
Class used to store "fi"
analysis objects.
Objects can be created by calls of the form new("fi", ...)
.
Single slot classe used to store a "data.frame"
object.
fi
:Object of class "data.frame"
~~
signature(x = "fi")
: ...
Rodrigo Aluizio
See Also as fi
showClass("fi")
showClass("fi")
An example dataset containing some taxa abundances to use in exemples of the fi
and she
functions.
data(LF)
data(LF)
A data frame with 29 taxa on 23 sites.
This dataset is an artificial random generated example. Unfortunately at the moment, due to authorship issues I can not present any real one. This may change in future versions.
data(LF) str(LF)
data(LF) str(LF)
An example dataset containing some taxa abundances and Biomasses to use in exemples of the abc
function.
data(NB)
data(NB)
A data frame with 316 taxa on the following 2 variables.
a numeric vector with abundance data.
a numeric vector with biomass data.
This dataset is an artificial random generated example. Unfortunately at the moment, due to authorship issues I can not present any real one. This may change in future versions.
data(NB) str(NB)
data(NB) str(NB)
plot
~~~~ Methods for function plot
~~
signature(x = "abc")
An object of class "abc"
resulting from and abc
analysis.
signature(x = "ANY")
Other classes objects that will be handled by plot.default
.
signature(x = "fi")
An object of class "fi"
resulting from and fi
analysis.
signature(x = "she")
An object of class "she"
resulting from and she
analysis.
This function is a customizable plot for the abundance and biomass lines from the ABC object.
## S4 method for signature 'abc' plot(x, xlim = c(0, ceiling(log(length(x@abc$Accum.Abund)))), ylim = c(0, 100), yaxp = c(0, 100, 10), lty.bio = 'dotted', lty.abu = 'solid', lwd = 2, col.bio = 'black', col.abu = 'black', xlab = expression('Species Rank'~(Log[e]~Scale)), ylab = 'Cumulative Dominance %', leg = TRUE, W = TRUE, col.pol = '#f5f5f5', ...)
## S4 method for signature 'abc' plot(x, xlim = c(0, ceiling(log(length(x@abc$Accum.Abund)))), ylim = c(0, 100), yaxp = c(0, 100, 10), lty.bio = 'dotted', lty.abu = 'solid', lwd = 2, col.bio = 'black', col.abu = 'black', xlab = expression('Species Rank'~(Log[e]~Scale)), ylab = 'Cumulative Dominance %', leg = TRUE, W = TRUE, col.pol = '#f5f5f5', ...)
x |
an object of class |
xlim |
the x limits (x1, x2) of the plot, defaults from 0 to the maximum value of x (in a log scale). |
ylim |
the y limits (x1, x2) of the plot, defaults to |
yaxp |
a vector of the form c(y1, y2, n) giving the coordinates of the extreme tick marks and the number of intervals between tick-marks, defaults to |
lty.bio |
line type of the biomass curve, defaults to |
lty.abu |
line type of the abundance curve, defaults to |
lwd |
the line width, a positive number, defaulting to 2. |
col.bio |
the line color of the biomass curve, defaulting to |
col.abu |
the line color of the abundance curve, defaulting to |
xlab |
a label for the x axis, defaults to |
ylab |
a label for the y axis, defaults to |
leg |
logical; if TRUE draws a legend at the |
W |
logical; if TRUE draws the W statistics value at the |
col.pol |
the polygon filling color, defaults to |
... |
other graphical parameters, see |
The plot produces a two lines plot with a ln abscissa and uses the axis
function, so a complete customization (i.e. side
) of the axes is not possible at this moment.
For more details on other graphic prameters such as line and box types see par
and plot.default
.
Rodrigo Aluizio
Warwick, R.M. (1986). A new method for detecting pollution effects on marine macrobenthic communities. Marine Biology 92 (4), 557-562.
Warwick, R.M., & Clarke, K.R. (1994). Relearning the ABC: taxonomic changes and abundance/biomass relationships in disturbed benthic communities. Marine Biology 118 (4), 739-744.
data(NB) MyABC <- abc(NB) plot(MyABC)
data(NB) MyABC <- abc(NB) plot(MyABC)
This function generates custom plots for FI objects.
## S4 method for signature 'fi' plot(x, ylim = c(1, 10), yaxp = c(1, 10, 9), xlab = 'Samples', ylab = 'FORAM Index', pch.urg = 25, pch.mrg = 21, pch.crg = 24, bg.urg = 'red', bg.mrg = 'yellow', bg.crg = 'green', pt.cex = 1, limits = TRUE, ...)
## S4 method for signature 'fi' plot(x, ylim = c(1, 10), yaxp = c(1, 10, 9), xlab = 'Samples', ylab = 'FORAM Index', pch.urg = 25, pch.mrg = 21, pch.crg = 24, bg.urg = 'red', bg.mrg = 'yellow', bg.crg = 'green', pt.cex = 1, limits = TRUE, ...)
x |
an object of class |
ylim |
the y limits (x1, x2) of the plot, defaults to |
yaxp |
a vector of the form c(y1, y2, n) giving the coordinates of the extreme tick marks and the number of intervals between tick-marks, defaults to |
xlab |
a label for the x axis, defaults to |
ylab |
a label for the y axis, defaults to |
pch.urg |
plotting 'character', i.e., symbol to use, prefer one between 21:25, defaults to |
pch.mrg |
plotting 'character', i.e., symbol to use, prefer one between 21:25, defaults to |
pch.crg |
plotting 'character', i.e., symbol to use, prefer one between 21:25, defaults to |
bg.urg |
background (fill) color for the open plot symbols given by |
bg.mrg |
background (fill) color for the open plot symbols given by |
bg.crg |
background (fill) color for the open plot symbols given by |
pt.cex |
character (or symbol) expansion: a numerical vector, defaults to 1. |
limits |
logical; if TRUE, draws lines limiting the three FORAM Index classes and identifies them, defaults to |
... |
other graphical parameters, see |
The plot uses the axis
function, so a complete customization (i.e. side
) of the axes is not possible at this moment, and some other parameters may show improperly if changed.
FI > 4 indicates environment conducive to reef growth (CRG), FI varying between 3 and 5 indicates environmental change (Coefficient of Variation > 0.1), 2 < FI < 4 indicates environment marginal for reef growth (MRG) and unsuitable for recovery and FI < 2 indicates stressed conditions unsuitable for reef growth (UGR).
For more details on other graphic prameters see plot.default
and par
.
Rodrigo Aluizio
Hallock, P., Lidz, B.H., Cockey-Burkhard, E.M. & Donnelly, K.B. (2003). Foraminifera as bioindicators in coral reef assessment and monitoring: The foram index. Environmental monitoring and assessment 81, 221-238.
data(LF) data(Factors) MyFI <- fi(LF, Factors) plot(MyFI)
data(LF) data(Factors) MyFI <- fi(LF, Factors) plot(MyFI)
This function generates customizable graphics for objects of the class she
.
## S4 method for signature 'she' plot(x, pch = 20, pcol = 'black', pcex = 1, pbg = 'black', lcol = 'black', lwd = 1, lty = 'dotted', ylab = expression('ln'~italic(E)), bty = 'l', ...)
## S4 method for signature 'she' plot(x, pch = 20, pcol = 'black', pcex = 1, pbg = 'black', lcol = 'black', lwd = 1, lty = 'dotted', ylab = expression('ln'~italic(E)), bty = 'l', ...)
x |
an object of class |
pch |
plotting 'character', i.e., symbol to use with the points, defaults to |
pcol |
color code or name for plot symbols, defaults to |
pcex |
character (or symbol) expansion: a numerical vector, defaults to |
pbg |
background (fill) color for the open plot symbols given by pch=21:25, defaults to |
lcol |
a specification for the default plotting color of the line, defaults to |
lwd |
the line width, a positive number, defaulting to |
lty |
the line type. Line types can either be specified as an integer (0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash) or as one of the character strings "blank", "solid", "dashed", "dotted", "dotdash", "longdash", or "twodash", where "blank" uses 'invisible lines' (i.e., does not draw them). |
ylab |
a label for the y axis, defaults to |
bty |
box type drawn about the plot, defaults to |
... |
other parameters to be passed to |
The plot produces a line plot with points on a ln abscissa and uses the axis
function, so a complete customization (i.e. side
) of the axes is not possible at this moment.
For more details on other graphic prameters see par
.
Rodrigo Aluizio
Buzas, M.A. & Hayek, L.A.C. (1998). SHE analysis for biofacies identification. Journal of Foraminiferal Research 28 (3), 233-239.
Wilson, B., Dawe, R., Gopee, A., Grant, S., Kissoon, A., Young, T., Noon, C., McLean, A. & Singh, K. (2010). Determining Boundaries between Abundance Biozones Using Minimal Equipment. International Journal of Ecology 2010, 1-14.
data(LF) MySHE <- she(LF, "abun") plot(MySHE)
data(LF) MySHE <- she(LF, "abun") plot(MySHE)
This function implements the SHE method in community abundance datasets.
she(df, method)
she(df, method)
df |
a numerical data frame with samples as columns and taxa as rows. |
method |
the method to be used, ( |
This method is intended to determine boundaries between abundance biozones, based in raw abundance (SHEbi) or in frequency (SHEbip) (Buzas et al. 1998, Wilson et al. 2010).
The custom plot produces a line plot with points on a ln abscissa and uses the axis
function, so a complete customization (i.e. side
) of the axes is not possible at this moment.
S |
richness values. |
H |
shannon diversity values. |
E |
equitability values. |
N or L |
number of specimens (N) or sites rank based on specimens frequency (L). |
This function implements great part of the process, but a small part must be caried out for the researcher when defining where to cut biozones before reruning the test.
For more details on other graphic prameters see par
.
Rodrigo Aluizio
Buzas, M.A. & Hayek, L.A.C. (1998). SHE analysis for biofacies identification. Journal of Foraminiferal Research 28 (3), 233-239.
Wilson, B., Dawe, R., Gopee, A., Grant, S., Kissoon, A., Young, T., Noon, C., McLean, A. & Singh, K. (2010). Determining Boundaries between Abundance Biozones Using Minimal Equipment. International Journal of Ecology 2010, 1-14.
data(LF) MySHE <- she(LF, "abun") plot(MySHE)
data(LF) MySHE <- she(LF, "abun") plot(MySHE)
"she"
Class used to store "she"
analysis objects.
Objects can be created by calls of the form new("she", ...)
.
Single slot classe used to store a "data.frame"
object.
bi
:Object of class "data.frame"
~~
signature(x = "she")
: ...
Rodrigo Aluizio
See Also as she
showClass("she")
showClass("she")