cluster_representation: cluster representation

Description Usage Arguments Examples

View source: R/cluster_heterogeneity.R

Description

cluster representation

Usage

1
cluster_representation(cc, n.samples = 1)

Arguments

cc

cluster counts

n.samples

vector containing the number of samples. Must mach number of rows in cc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## cluster table, no subsamples
cc <- table(sample(paste0("C", 1:12), size = 1000, replace = TRUE))

( cc <- cluster_representation(cc) )

cc <- data.frame(cluster = sample(paste0("C", 1:12), size = 1000,
                                  replace = TRUE),
            sample = sample(paste0("S", 1:6), size = 1000, replace = TRUE))

cc <- table(cc[, c("cluster", "sample")])
cc[cc <= 10] <- 0

ns <- rowSums(binary.mat(cc))

( cc <- cluster_representation(cc, n.samples = ns) )

SingerLab/gac documentation built on July 22, 2021, 3:27 a.m.