clusterTreeToClusterTreePlotInfo: transform a clusterTree object into a clusterTreePlotInfo...

Description Usage Arguments Value Examples

Description

transform a clusterTree object into a clusterTreePlotInfo object clusterTreePlotInfo object is a unified data structure for recording information related to plotting clusterTree object

Usage

1

Arguments

x

a clusterTree object

padding

padding must have a value between 0 and 1, representing the proportion of space

Value

a clusterTreePlotInfo object

clusterTreePlotInfo is a nested structure which record information for

plotting clusterTree

tree

a matrix, tree attribute of clusterTree object that remains to be plotted

rectangles

a list of rectangles, each element record left,bottom,right,top coordinates of the rectangle

labels

a list of list of labels' index, each element record labels' index for corresponding rectangle

lines

a list of list of lines, each element record lines' start and end point

is.runts

a list of boolean variable, each element record whether that rectangle is runts or not

subtree

a list of subtree, each element represents the nested subtree of corresponding rectangle

Examples

1
2
3
4
5
6
7
8
9
data <- rbind(matrix(rnorm(100, mean = 10, sd = 2), nrow = 50),
              matrix(rnorm(100, mean = 0, sd = 1), nrow = 50),
              matrix(rnorm(100, mean = -10, sd = 3), nrow = 50)
              )
clustering1<-stats::hclust(dist(data),method='single')
clustering2<-kmeans(data,centers=3)
clustering3<-dbscan::dbscan(data,eps=.1)
clusterTree <- combineClusterings(clustering1,clustering2,clustering3)
res <- clusterTreeToClusterTreePlotInfo(clusterTree)

rwoldford/trec documentation built on May 15, 2019, 6:29 p.m.