plotCUS: Plots the extracted scaled cumulative sum for a selected...

Description Usage Arguments Details Author(s) References Examples

View source: R/plotCUS_function.R

Description

Plots the raw extracted scaled cumulative sum for a selected taxon/taxa/group and sample distribution. This plot is create with ggplot2.

Usage

1
plotCUS(samp, tax, var, abu, taxon = NULL, ncol = NULL, xmin = NULL, xmax = NULL, log = FALSE, psize = 1, labels = TRUE, linetype = "dashed", xlab = "Gradient", ylab = "Scaled cumulative sum")

Arguments

samp

A vector containing codes for each sample.

tax

A vector containing names or codes for the different taxa/groups.

var

A numeric vector containing the variables of an environmental gradient.

abu

A numeric vector containing the variables representing abundance. If one does not want to include abundance and only asses occurrence the one can simply use the same vector as for the "var" vector.

taxon

The name of the taxon that needs to be displayed. This can be a single taxon or multiple. Needs to be in the form of a character vector. If left to default (NULL) all taxa are plotted.

ncol

The number of columns in the plot.

xmin

A numeric argument that defines the minimal value of the x-axis. Default is NULL.

xmax

A numeric argument that defines the maximum value of the x-axis. Default is NULL.

log

An argument that can be used to set the x-axis to Log scale. Default is FALSE.

psize

The point size. Default is 1.

labels

An argument that indicates if names of the taxon are displayed in a rectangle above the plot. Default is TRUE.

linetype

The linetype indicating the threshold for the specified taxon. Default is "dashed".

xlab

The label of the x-axis. Default is "Gradient".

ylab

The label of the y-axis. Default is "Scaled cumulative sum".

Details

The blue dots indicate the sample distribution. The green dots the distribution of a positive responding taxon/group. The red dots the distribution of a negative responding taxon/group. The dashed vertical line indicates the threshold. Note that the results displayed are from the raw data, not the bootstrapped results.

Author(s)

Willem Kaijser

References

Wickham, H., 2009. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York.

Examples

1
2
3
4
5
6
7
8
## Not run: 
#Plot the results of Fontinalis antipyretica in a scatterplot
plotCUS(hco3$Sample, hco3$Taxon, hco3$Variable, taxon = "Fontinali antipyretica")

#Plot all taxon in a scatterplot
plotCUS(hco3$Sample, hco3$Taxon, hco3$Variable)

## End(Not run)

snwikaij/GRASS documentation built on July 29, 2020, 1:54 p.m.