Learn R Programming

COMMUNAL (version 1.0)

clusterRange: COMMUNAL convenience harness

Description

Convenience harness to run COMMUNAL on a range of inputs, for a fixed set of parameters. The columns are the points to be clustered. The goal is to reduce the dimensionality of the data points, and try clustering with a varying number of dimensions. The rows are (optionally) first sorted by variance. The top x rows are used for clustering by COMMUNAL, for each x in varRange. Output is used by plotRange3D to generate 3D plot.

Usage

clusterRange(dataMtx, varRange, ...)

Arguments

dataMtx
The data for input to COMMUNAL.
varRange
Numeric vector of how many items of data matrix to cluster. clusterRange runs COMMUNAL on the x rows (dimensions) with the highest variance for each element x in varRange.
...
Arguments to pass down to COMMUNAL. If reorder=FALSE is specified, then the rows will not be first sorted by variance in this function, and the rows will be taken in the given order. By defaul

Value

  • all.resultslist of COMMUNAL objects, one for each range in varRange
  • varRangethe varRange input parameter

Examples

Run this code
## To identify k, use clusterRange and plotRange3D to visualize validation measures
data(BRCA.100) # 533 tissues to cluster, with measurements of 100 genes each
varRange <- c(50, 75, 100)
clus.methods <- c("hierarchical", "kmeans")
validation <- c('wb.ratio', 'dunn', 'avg.silwidth')
range.results <- clusterRange(BRCA.100, varRange, ks=2:5, clus.methods=clus.methods,
                              validation=validation)
plot.data <- plotRange3D(range.results, ks=2:5, clus.methods, validation)
## Note: the BRCA.results dataset was generated by running clusterRange on 
## a larger range than the one here (with a larger input dataset)

Run the code above in your browser using DataLab