View source: R/hclustWrapper.R
hclustWrapper | R Documentation |
This fuction is a wrapper for the hclust, dist, and cutree functions. It outputs a string of a concatenated vector of 1's and 2's indexed by column. This function is not meant to be run individually, but as a 'clustFunc' argument for running 'K2preproc()', 'runK2Taxonomer()', and 'K2tax()'.
hclustWrapper(dataMatrix, clustList)
dataMatrix |
An P x N numeric matrix of data. |
clustList |
Named list of objects to use for clustering procedure. Or ‘NULL' to use Euclidean distance with Ward’s method.
|
A character string of concatenated 1's and 2's pertaining to the cluster assignment of each column in dataMatrix.
reed_2020K2Taxonomer
## Read in sample ExpressionSet
require(Biobase)
data('sample.ExpressionSet')
## Extrat subset of data matrix
dm <- exprs(sample.ExpressionSet)[seq_len(50),]
## Create list of objects for clustering procedure.
cL <- list(distMetric='euclidean', aggMethod='ward.D2')
## Generate K=2 split with hierarchical clustering
hclustWrapper(dm, cL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.