Description Usage Arguments Details Value Note Author(s) See Also Examples
These functions all produce a plot of some measure related to dissimilarity matrices. All of these functions allow you to specify a vector of methods to be used when creating the plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | dissim.clust.plot(data, is.OTU=TRUE, stand.method=NULL,
dist.methods=NULL,
clust.methods=NULL, file=NULL)
dissim.eig.plot(data, is.OTU=TRUE, stand.method=NULL,
dist.methods=NULL, file=NULL)
dissim.alleig.plot(data, is.OTU=TRUE, stand.method=NULL,
dist.methods=NULL, file=NULL)
dissim.ord.plot(data, is.OTU=TRUE, stand.method=NULL,
dist.methods=NULL, k=NULL, file=NULL)
dissim.GOF.plot(data, is.OTU=TRUE, stand.method=NULL,
dist.methods=NULL, file=NULL)
dissim.tree.plot(data, is.OTU=TRUE, stand.method=NULL,
dist.methods=NULL,
clust.methods=NULL, file=NULL)
dissim.pvar.plot(data, is.OTU=TRUE, stand.method=NULL,
dist.methods=NULL, file=NULL)
|
data |
a list of ecology data.
See also |
is.OTU |
logical, whether the ecology data sets are OTU tables or taxonomy abundance matrices. |
stand.method |
optional, if |
dist.methods |
a character vector representing the dissimilarity indices to be
used; each element must be one of one of " |
clust.methods |
a character vector representing the methods used for clustering
the data. Each element must be one of " |
k |
the number of dimensions desired. If |
file |
the file path for the plot. If not provided (defaults to NULL),
then the plot is displayed to the screen. If |
All of these functions (other than dissim.alleig.plot
)
call dissim.X
counterparts and plot the data.
If file
is given, a .tiff
file will be created at
file
; otherwise the plot is displayed to the screen.
All functions create a plot and return the plotted data invisibly.
|
plots a hierarchical clustering of the dissimilarity matrix. |
|
plots a bar plot of the eigenvalues of the dissimilarity matrix. |
|
plots a line plot showing the relative importance of all eigenvalues for a variety of methods. |
|
plots a scatter plot comparing the "euclidean" distances among all samples in ordination space to the dissimilarity matrix distances. |
|
plots a scatter plot of the goodness of fit values of the dissimilarity matrix, for various numbers of dimensions used. |
|
plots a scatter plot comparing the tree distances to the dissimilarity matrix distances. |
|
plots a bar plot showing the percent variation explained by each axis (where each sample corresponds to an axis). |
If file
does not end in ".tiff", then ".tiff" will be
appended to the end of file
.
Function dissim.alleig.plot
uses the ggplot2
package for creating the plot, and returns the plot object.
This means that you can store this plot and add other features
manually, if desired (see Examples).
Wen Chen and Joshua Simpson
vegdist
, hclust
,
dissim
, ggplot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | data(ITS1, ITS2)
data <- list(ITS1=ITS1, ITS2=ITS2)
# show percent variation for only ITS1 with default methods
dissim.pvar.plot(data=list(ITS1=ITS1))
## Not run:
# show clustering for ITS1 and ITS2 for set methods
dissim.clust.plot(data=data, is.OTU=TRUE, stand.method=NULL,
dist.methods=c("morisita", "bray"),
clust.methods=c("average", "centroid"))
dissim.ord.plot(data=data, is.OTU=TRUE, stand.method="total",
dist.method="bray")
# dissim.alleig.plot returns a ggplot2 object:
my.eig.plot <- dissim.alleig.plot(data)
class(my.eig.plot) # returns "gg" "ggplot"
my.eig.plot # view the plot
# update the title, then view the updated plot
my.eig.plot <- my.eig.plot + ggtitle("My New Title")
# update ggplot theme
require("grid")
new_theme <-RAM.color()
my.eig.plot <- my.eig.plot + new_theme
my.eig.plot
# save an image (named file.pdf) with GOF values for ITS1 and
# ITS2, using default methods
dissim.GOF.plot(data=data, file="~/Documents/my/file")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.