Description Usage Arguments Value Examples
Method available to plot results of analyses in ASICS package.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
An object of class AnalysisResults. |
y |
Currently not used. |
... |
Currently not used. |
graph |
A vector specifying what to plot. Allowed values are
|
add.label |
If |
n.label.var |
An integer indicating the number of label to add on variable plot. |
axes |
A numeric vector of length 2 specifying the dimensions to be plotted for individual and variable plots. |
col.ind |
A character specifying the name of the design variable used to color the observations by groups for PCA individual plot. |
xlim, ylim |
Boundaries for x and y, respectively. |
PCA: a ggplot
plot that allows for the
visualisation of PCA results (eigen values, individuals and variables)
OPLS-DA: a ggplot
plot that allows for the
visualisation of OPLS-DA results (individuals and variables). If
cross.val > 1
in oplsda
, the best model is plotted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Import quantification results
if (require("ASICSdata", quietly = TRUE)) {
quantif_path <- system.file("extdata", "results_ASICS.txt",
package = "ASICSdata")
quantification <- read.table(quantif_path, header = TRUE, row.names = 1)
# Import design
design <- read.table(system.file("extdata", "design_diabete_example.txt",
package = "ASICSdata"), header = TRUE)
design$condition <- factor(design$condition)
# Create object for analysis and remove metabolites with more than 25% of
# zeros
analysis_obj <- formatForAnalysis(quantification,
zero.threshold = 25, design = design)
# Perform a PCA and plot results
res_pca <- pca(analysis_obj)
plot(res_pca)
# Perform an OPLS-DA and plot results
res_oplsda <- oplsda(analysis_obj, "condition", orthoI = 1)
plot(res_oplsda)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.