Calculate average loadings of each cluster
buildAvgLoading(dat, k, n = 20, cluster = NULL, study = TRUE)
A data frame. Each row represents principle components from different training datasets. Columns are genes used for PCA analysis.
The number of clusters used for hierarchical clustering
The number of top principle components from each datasets used for model building. Default is 20.
Provide pre-defined cluster membership of your data.
Under default (TRUE
), studies involved in each cluster
will be added in the output.
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