View source: R/buildAvgLoading.R
buildAvgLoading | R Documentation |
Calculate average loadings of each cluster
buildAvgLoading(dat, k, n = 20, cluster = NULL, study = TRUE)
dat |
A data frame. Each row represents principle components from different training datasets. Columns are genes used for PCA analysis. |
k |
The number of clusters used for hierarchical clustering |
n |
The number of top principle components from each datasets used for model building. Default is 20. |
cluster |
Provide pre-defined cluster membership of your data. |
study |
Under default ( |
A named list of 6 elements is returned. It contains:
cluster
A numeric vector on cluster membership of PCs
size
A integer vector on the size of clusters
avgLoading
A matrix of average loadings. Columns for clusters and rows for genes
k
The number of clusters
n
The number of top PCs used for clustering
studies
A list of character vector containing studies in each cluster
data(miniAllZ)
data(res_hcut)
res <- buildAvgLoading(miniAllZ, k = 40, cluster = res_hcut$cluster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.