cluster_exposure | R Documentation |
Proportional sample exposures will be used as input to perform clustering.
cluster_exposure(
result,
nclust,
proportional = TRUE,
method = "kmeans",
dis.method = "euclidean",
hc.method = "ward.D",
clara.samples = 5,
iter.max = 10,
tol = 1e-15
)
result |
A |
nclust |
Pre-defined number of clusters. |
proportional |
Logical, indicating if proportional exposure (default) will be used for clustering. |
method |
Clustering algorithms. Options are "kmeans" (K-means), "hkmeans" (hybrid of hierarchical K-means), "hclust" (hierarchical clustering), "pam" (PAM), and "clara" (Clara). |
dis.method |
Methods to calculate dissimilarity matrix. Options are "euclidean" (default), "manhattan", "jaccard", "cosine", and "canberra". |
hc.method |
Methods to perform hierarchical clustering. Options are "ward.D" (default), "ward.D2", "single", "complete", "average", "mcquitty", "median", and "centroid". |
clara.samples |
Number of samples to be drawn from dataset. Only used when "clara" is selected. Default is 5. |
iter.max |
Maximum number of iterations for k-means clustering. |
tol |
Tolerance level for kmeans clustering level iterations |
A one-column data frame with sample IDs as row names and cluster number for each sample.
kmeans
set.seed(123)
data(res_annot)
clust_out <- cluster_exposure(res_annot, nclust = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.