Description Usage Arguments Value Examples
Add a link on a compositional plot
1 2 3 |
DIplot |
A list with ggplot object where the links are to be added, and data frames with coordinates (obtained by setting plot(..., returnCoords = TRUE)) |
links |
A matrix containing either feature names (two column matrix) or approximate coordinates (four column matrix) |
Views |
Indices or names of the views for which the links should be added |
samples |
Sample names or approximate sample coordinates |
variable |
Name of variable in environmental gradient for which link should be plotted |
Dims |
vector of length 2 referring to the model dimensions |
addLabel |
A boolean, should arrow with label be plotted? |
labPos |
The position of the label, as a numeric vector of length 2 |
projColour |
The colour of the projection, as character string |
latentSize |
Size of the line from the origin to the latent variable dot |
A ggplot object with the links added
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(Zhang)
#Unconstrained
microMetaboInt = combi(
list("microbiome" = zhangMicrobio, "metabolomics" = zhangMetabo),
distributions = c("quasi", "gaussian"), compositional = c(TRUE, FALSE),
logTransformGaussian = FALSE, verbose = TRUE)
load(system.file("extdata", "zhangFits.RData", package = "combi"))
Plot = plot(microMetaboInt, samDf = zhangMetavars, samCol = "ABX",
returnCoords = TRUE)
addLink(Plot, links = cbind("OTU0565b3","OTUa14fb5"), Views = 1,
samples = c(1,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.