R/calculate_distance.R
kcentroid.RdThis function calculates the mean value for each feature of each class to calculate the prototypic centroids of the different groups
kcentroid(data, class)
| data | a scaled gene expression |
|---|---|
| class | a vector with the samples classes |
returns a data.frame with the estimated prototypic centroids for each class with the features names as rownames
if (FALSE) { rna_luad<-use_rna_luad() prm <- rna_luad$TCGA$expression_matrix Dist <- calculate_distance_pearson_cpu(prm) k <- 4 Pam <- cluster_algorithm(Dist,k)$cluster centroids <- kcentroid(prm,Pam) }