identify.hclust(stats)
identify.hclust()所属R语言包:stats
Identify Clusters in a Dendrogram
确定在一个树状集群
译者:生物统计家园网 机器人LoveR
描述----------Description----------
identify.hclust reads the position of the graphics pointer when the (first) mouse button is pressed. It then cuts the tree at the vertical position of the pointer and highlights the cluster containing the horizontal position of the pointer. Optionally a function is applied to the index of data points contained in the cluster.
identify.hclust读取(一)鼠标按钮被按下时,图形指针的位置。然后切开在垂直位置的指针树,突出集群包含指针的水平位置。可选的功能应用到集群中的数据点的指数。
用法----------Usage----------
## S3 method for class 'hclust'
identify(x, FUN = NULL, N = 20, MAXCLUSTER = 20, DEV.FUN = NULL,
...)
参数----------Arguments----------
参数:x
an object of the type produced by hclust.
由hclust类型的对象。
参数:FUN
(optional) function to be applied to the index numbers of the data points in a cluster (see "Details" below).
(可选)功能被应用到集群中的数据点(见下面的“详细资料”)的索引号。
参数:N
the maximum number of clusters to be identified.
确定集群的最大数量。
参数:MAXCLUSTER
the maximum number of clusters that can be produced by a cut (limits the effective vertical range of the pointer).
由切(垂直范围限制了有效的指针),可以产生集群的最大数量。
参数:DEV.FUN
(optional) integer scalar. If specified, the corresponding graphics device is made active before FUN is applied.
(可选)整数标。如果指定了相应的图形设备作出了积极的前FUN应用。
参数:...
further arguments to FUN.
FUN进一步的论据。
Details
详情----------Details----------
By default clusters can be identified using the mouse and an invisible list of indices of the respective data points is returned.
默认情况下,群集可以使用鼠标和invisible指数将返回各自的数据点的名单确定。
If FUN is not NULL, then the index vector of data points is passed to this function as first argument, see the examples below. The active graphics device for FUN can be specified using DEV.FUN.
FUN如果非NULL,然后数据点的指数向量传递给这个函数作为第一个参数,看下面的例子。活跃的图形设备FUN可以指定使用DEV.FUN。
The identification process is terminated by pressing any mouse button other than the first, see also identify.
鉴定过程中被终止按第一以外的其他任何鼠标按钮,也看到identify。
值----------Value----------
Either a list of data point index vectors or a list of return values of FUN.
无论是数据点指数向量或FUN返回值列表的列表。
参见----------See Also----------
hclust, rect.hclust
hclust,rect.hclust
举例----------Examples----------
require(graphics)
hca <- hclust(dist(USArrests))
plot(hca)
(x <- identify(hca)) ## Terminate with 2nd mouse button !![#终止与第二鼠标按钮!]
hci <- hclust(dist(iris[,1:4]))
plot(hci)
identify(hci, function(k) print(table(iris[k,5])))
# open a new device (one for dendrogram, one for bars):[打开一个新的设备(一个树状图,条形之一):]
get(getOption("device"))() # << make that narrow (& small)[<<使该窄(小)]
# and *beside* 1st one[和*旁*一日一]
nD <- dev.cur() # to be for the barplot[是为barplot的]
dev.set(dev.prev())# old one for dendrogram[旧为树状]
plot(hci)
## select subtrees in dendrogram and "see" the species distribution:[#选择在聚类子树和“看到”物种的分布:]
identify(hci, function(k) barplot(table(iris[k,5]),col=2:4), DEV.FUN = nD)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|