plotgg.PCO | R Documentation |
Function for plotting results of PCO
.
## S3 method for class 'PCO' plotgg( x, components = c("PCo1", "PCo2"), shape = NULL, col = NULL, fill = NULL, point_size = 2 )
x |
A |
components |
Vector of length 2 indicating which components to plot. |
shape |
String indicating which variable to use as aestetics mapping for shape. Must correspond to a column header in the Map attribute of the PCO object. |
col |
String indicating which variable to use as aestetics mapping for color. Must correspond to a column header in the Map attribute of the PCO object. |
fill |
String indicating which variable to use as aestetics mapping for fill. Must correspond to a column header in the Map attribute of the PCO object. |
point_size |
point_size |
size for the points in the plot
A ggplot2 object of the PCoA plot.
Sur from Dangl Lab.
PCO
data(Rhizo) data(Rhizo.map) Dat <- create_dataset(Rhizo,Rhizo.map) # distfun <- function(x) vegan::vegdist(x,method="bray") #requires vegan package distfun <- dist Dat.pco <- PCO(Dat,dim=2,distfun=distfun) plotgg(Dat.pco) plotgg(Dat.pco,shape="fraction",point_size=3) plotgg(Dat.pco,shape="fraction",col="accession",point_size=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.