ggordpoint {MicrobiotaProcess} | R Documentation |
ordination plotter based on ggplot2.
ggordpoint(obj, ...) ## Default S3 method: ggordpoint( obj, pc = c(1, 2), mapping = NULL, sampleda = NULL, factorNames = NULL, factorLevels = NULL, poinsize = 2, linesize = 0.3, arrowsize = 1.5, arrowlinecolour = "grey", ellipse = FALSE, ellipse_pro = 0.9, ellipse_alpha = 0.2, biplot = FALSE, topn = 5, settheme = TRUE, speciesannot = FALSE, fontsize = 2.5, fontface = "bold.italic", fontfamily = "sans", textlinesize = 0.02, ... ) ## S3 method for class 'pcasample' ggordpoint(obj, ...)
obj |
prcomp class or pcasample class, |
... |
additional parameters, see |
pc |
integer vector, the component index. |
mapping |
set of aesthetic mapping of ggplot2, default is NULL. |
sampleda |
data.frame, nrow sample * ncol factors, default is NULL. |
factorNames |
vector, the names of factors contained sampleda. |
factorLevels |
list, the levels of the factors, default is NULL, if you want to order the levels of factor, you can set this. |
poinsize |
numeric, the size of point, default is 2. |
linesize |
numeric, the line size of segment, default is 0.3. |
arrowsize |
numeric, the size of arrow, default is 1.5. |
arrowlinecolour |
character, the color of segment, default is grey. |
ellipse |
logical, whether add confidence ellipse to ordinary plot, default is FALSE. |
ellipse_pro |
numeric, confidence value for the ellipse, default is 0.9. |
ellipse_alpha |
numeric, the alpha of ellipse, default is 0.2. |
biplot |
logical, whether plot the species, default is FALSE. |
topn |
integer or vector, the number species have top important contribution, default is 5. |
settheme |
logical, whether set the theme for the plot, default is TRUE. |
speciesannot |
logical, whether plot the species, default is FALSE. |
fontsize |
numeric, the size of text, default is 2.5. |
fontface |
character, the font face, default is "blod.italic". |
fontfamily |
character, the font family, default is "sans". |
textlinesize |
numeric, the segment size in |
point figures of PCA or PCoA.
Shuangbin Xu
#don't run in examples #library(phyloseq) #data(GlobalPatterns) #subGlobal <- subset_samples(GlobalPatterns, # SampleType %in% c("Feces", "Mock", "Ocean", "Skin")) #pcares <- get_pca(subGlobal, method="hellinger") #pcaplot <- ggordpoint(pcares, biplot=TRUE, # speciesannot=TRUE, # factorNames=c("SampleType"), ellipse=TRUE)