PVCA {statVisual} | R Documentation |
Principal Variance Component Analysis (PVCA)
Description
Plot of weighted average proportion variance versus effects in principal variance component analysis (PVCA).
Usage
PVCA(
clin_data,
clin_subjid,
gene_data,
pct_threshold = 0.8,
batch.factors,
theme_classic = FALSE,
addThemeFlag = TRUE,
...)
Arguments
clin_data |
A data frame containing clinical information, including an id variable that corresponds to rownames of |
clin_subjid |
character. The column name of |
gene_data |
A data frame with genes as rows and subjects as columns. |
pct_threshold |
numeric. The percentile value of the minimum amount of the variabilities that the selected principal components need to explain |
batch.factors |
character. A vector of factors that the mixed linear model will be fit on. |
theme_classic |
logical. Use classic background without grids (default: TRUE). |
addThemeFlag |
logical. Indicates if light blue background and white grid should be added to the figure. |
... |
other input parameters for facet & theme |
Value
A list with 9 elements.
data
, layers
, scales
, mapping
,
theme
, coordinates
,
facet
, plot_env
, and labels
.
Author(s)
Wenfei Zhang <Wenfei.Zhang@sanofi.com>, Weiliang Qiu <Weiliang.Qiu@sanofi.com>, Xuan Lin <Xuan.Lin@sanofi.com>, Donghui Zhang <Donghui.Zhang@sanofi.com>
Examples
library(pvca)
data(esSim)
print(esSim)
# expression data
dat = exprs(esSim)
print(dim(dat))
print(dat[1:2,])
# create a fake Batch variable
esSim$Batch=c(rep("A", 4), rep("B", 6), rep("C", 10))
# phenotype data
pDat = pData(esSim)
print(dim(pDat))
print(pDat[1:2,])
# feature data
fDat = fData(esSim)
print(dim(fDat))
print(fDat[1:2,])
statVisual(type = 'PVCA',
clin_data = pData(esSim),
clin_subjid = "sid",
gene_data = exprs(esSim),
batch.factors = c("grp", "Batch"))
PVCA(
clin_data = pData(esSim),
clin_subjid = "sid",
gene_data = exprs(esSim),
batch.factors = c("grp", "Batch"))