Description Usage Arguments Value Author(s) Examples
Expand matrix of cluster labels into matrix of clusters
1 |
clLabels |
Matrix of cluster labels of size N x M. |
datasetNames |
Vector of cluster names of length M. Default is NULL. |
The output is a list containing:
moc |
the matrix of clusters. |
datasetIndicator |
a vector containing the dataset indicator. |
datasetNames |
an expanded vector of dataset names for the moc. |
Alessandra Cabassi alessandra.cabassi@mrc-bsu.cam.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Load data
data <- list()
data[[1]] <- as.matrix(read.csv(system.file("extdata", "dataset1.csv",
package = "coca"), row.names = 1))
data[[2]] <- as.matrix(read.csv(system.file("extdata", "dataset2.csv",
package = "coca"), row.names = 1))
data[[3]] <- as.matrix(read.csv(system.file("extdata", "dataset3.csv",
package = "coca"), row.names = 1))
# Build matrix of clusters
outputBuildMOC <- buildMOC(data, M = 3, K = 6, distances = "cor")
# Extract matrix of clusters
clLabels <- outputBuildMOC$clLabels
# Impute missing values
outputFillMOC <- fillMOC(clLabels, data = data)
# Replace matrix of cluster labels with new (full) one
clLabels <- outputFillMOC$fullClLabels
# Expand matrix of cluster labels into matrix of clusters
outputExpandMOC <- expandMOC(clLabels)
clLabels <- outputExpandMOC$clLabels
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.