Description Usage Arguments Details Value Author(s) References See Also Examples
This function plot correlation relationship among taxa at a give rank and / or numeric variables of metadata.
1 2 3 4 |
data |
a data frame that either an OTU table or taxonomy abundance matrix, can be missing but if metadata is also missing, an error message will be raised. |
is.OTU |
logical. Whether or not the data is an OTU table. |
meta |
the metadata table to be used. |
rank |
the taxonomic rank to use (see ?RAM.rank.formatting for formatting details). |
sel |
optional. It is a character vector of selected otuIDs or taxa
names at a given taxonomic rank. If provided, |
sel.OTU |
logical. Whether or not the selected items from data are otuIDs.
If |
data.trans |
a character string of one of the following, "total", "log",
"hellinger" etc, see |
method |
a character string, can be one of the following, "pearson",
"kendall", "spearman" for the calculation of correlation
coefficient (or covariance) is to be computed (see
|
main |
a character string. The title of the plot. |
file |
the file path where the image should be created (see ?RAM.plotting). |
ext |
filename extension, the type of image to be saved to. (see ?RAM.plotting). |
height |
the height of the image to be created (in inches). |
width |
the width of the image to be created (in inches). |
This function uses stats::cor
to calculate correlation
coefficient (or covariance), and uses lattice::levelplot
to generate the graph. (see References)
Option sel
is optional, however, it raises an error if
the total number of variables to be plotted was too big, and no
plot will be generated.
This function generates a graph showing correlation relationship among OTUs or taxa at a given rank, and numeric variables of metadata
Wen Chen.
Sarkar, Deepayan (2008) _Lattice: Multivariate Data Visualization with R_, Springer. <URL: http://lmdvr.r-forge.r-project.org/>
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_. Wadsworth & Brooks/Cole.
1 2 3 4 5 6 7 8 9 10 11 12 | data(ITS1, meta)
# only plot the first 10 OTUs
sel <- rownames(ITS1)[1:10]
correlation(data=ITS1, meta=meta, is.OTU=TRUE, sel.OTU=TRUE,
sel=sel)
## Not run:
sel <- c("Fusarium", "Cladosporium", "Alternaria")
correlation(data=ITS1, meta=meta, is.OTU=TRUE, sel.OTU=FALSE,
sel=sel, rank="g", data.trans="total",
file="test.pdf", ext="pdf")
## End(Not run)
|
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.