bplot_tree {lazy.cluster} | R Documentation |
Plot of Two Dimensional Data with Classification
bplot_tree(data = NULL, tree = NULL, ncl = 2, pca = 0, plotbase = NULL, title = NULL, noid = 0, xlim = NULL, ylim = NULL, colorlist = NULL)
data |
Data frame |
tree |
A class hclust object |
ncl |
A vector of the number of clusters |
pca |
= 1 to use pca of data as the plot base |
plotbase |
A matrix to be used as X in the biplot |
title |
= title string to be used |
noid |
= 1 not print id in plot |
xlim |
x-axis limits |
ylim |
y-axis limits |
colorlist |
A list of color names to be used |
This function plots data[,1:2], pca(data)[,1:2] or plotbase[,1:2]
with ids which come from the tree object.
The clustering result is marked by the colors given in colorlist.
pca has precedence over plotbase.
Y <- demodata[,1:8] set.seed(1701) resY2 <- hclust( dist(Y) ) bplot_tree( Y, resY2, 5, pca=1 ) resY3 <- dhclust( Y, maxclustersize=3 ) bplot_tree( Y, resY3$tree_l, 5, pca=1 ) bplot_tree( Y, resY3$tree_s, 5, pca=1 )