Plots Two Main Components of Principal Component Analysis

pcaTCGA(x, group.names, title = "", return.pca = FALSE, scale = TRUE,
  center = TRUE, var.scale = 1, obs.scale = 1, ellipse = TRUE,
  circle = TRUE, var.axes = FALSE, alpha = 0.8, add.lines = TRUE, ...)

Arguments

x
A data.frame or matrix containing i.e. expressions information. See expressionsTCGA.
group.names
Names of group variable to use in labels of the plot.
title
The title of a plot.
return.pca
Should return pca object additionaly to pca plot?
scale
As in prcomp.
center
As in prcomp.
var.scale
As in ggbiplot.
obs.scale
As in ggbiplot.
ellipse
As in ggbiplot.
circle
As in ggbiplot.
var.axes
As in ggbiplot.
alpha
As in ggbiplot.
add.lines
Should axis lines be added to plot.
...
Further arguments passed to prcomp.

Value

If return.pca = TRUE then a list containing a PCA plot (of class ggplot) and a pca model, the result of prcomp function. If not, then only PCA plot is returned.

ggbiplot

This function is based on https://github.com/vqv/ggbiplot which had to be copied to RTCGA because Bioconductor does not support remote dependencies from GitHub.

Issues

If you have any problems, issues or think that something is missing or is not clear please post an issue on https://github.com/RTCGA/RTCGA/issues.

See also

RTCGA website http://rtcga.github.io/RTCGA/articles/Visualizations.html.

Other RTCGA: RTCGA-package, boxplotTCGA, checkTCGA, convertTCGA, createTCGA, datasetsTCGA, downloadTCGA, expressionsTCGA, heatmapTCGA, infoTCGA, installTCGA, kmTCGA, mutationsTCGA, readTCGA, survivalTCGA, theme_RTCGA

Examples

## Not run: ------------------------------------ # library(dplyr) # ## RNASeq expressions # library(RTCGA.rnaseq) # expressionsTCGA(BRCA.rnaseq, OV.rnaseq, HNSC.rnaseq) %>% # rename(cohort = dataset) %>% # filter(substr(bcr_patient_barcode, 14, 15) == "01") -> BRCA.OV.HNSC.rnaseq.cancer # # pcaTCGA(BRCA.OV.HNSC.rnaseq.cancer, "cohort") # pcaTCGA(BRCA.OV.HNSC.rnaseq.cancer, "cohort", add.lines = FALSE) # pcaTCGA(BRCA.OV.HNSC.rnaseq.cancer, "cohort", return.pca = TRUE) -> pca.rnaseq # pca.rnaseq$plot # pca.rnaseq$pca ## ---------------------------------------------