找回密码
 注册
查看: 1116|回复: 0

R语言 vegan包 spantree()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 15:13:25 | 显示全部楼层 |阅读模式
spantree(vegan)
spantree()所属R语言包:vegan

                                        Minimum Spanning Tree
                                         最小生成树

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Function spantree finds a minimum spanning tree connecting all points, but disregarding dissimilarities that are at or above the threshold or NA.  
功能spantree找到一个连接所有点的最小生成树,但不计达到或超过阈值或NA的异同。


用法----------Usage----------


spantree(d, toolong = 0)
## S3 method for class 'spantree'
cophenetic(x)
spandepth(x)
## S3 method for class 'spantree'
plot(x, ord, cex = 0.7, type = "p", labels, dlim,
     FUN = sammon,  ...)
## S3 method for class 'spantree'
lines(x, ord, display="sites", ...)



参数----------Arguments----------

参数:d
Dissimilarity data inheriting from class dist or a an object, such as a matrix, that can be converted to a dissimilarity matrix. Functions vegdist and dist are some functions producing suitable dissimilarity data.
相异数据从类继承dist或一个对象,如为一个矩阵,可以转换到一个相异矩阵。功能vegdist和dist是合适的相异数据的一些功能。


参数:toolong
Shortest dissimilarity regarded as NA. The function uses a fuzz factor, so that dissimilarities close to the limit will be made NA, too. If toolong = 0 (or negative), no dissimilarity is regarded as too long.  
最短相异视为NA。该函数使用一个模糊的因素,所以,接近极限的异同,将NA,太。如果toolong = 0(或负),没有相异看作太长。


参数:x
A spantree result object.
Aspantree的结果对象。


参数:ord
An ordination configuration, or an ordination result known by scores.
协调配置,或知道scores的协调结果。


参数:cex
Character expansion factor.
字符膨胀系数。


参数:type
Observations are plotted as points with type="p" or type="b", or as text label with type="t". The tree (lines) will always be plotted.
绘制观测点type="p"或type="b",或作为文本标签type="t"。的树(系)将被绘制。


参数:labels
Text used with type="t" or node names if this is missing.
type="t"或节点名称使用的文字,如果没有这个。


参数:dlim
A ceiling value used to highest cophenetic dissimilarity.
一个值上限最高cophenetic相异的。


参数:FUN
Ordination function to find the configuration from cophenetic dissimilarities.  
排序功能来查找配置从cophenetic异同。


参数:display
Type of scores used for ord.
类型scores用于ord。


参数:...
Other parameters passed to functions.
其他参数传递给函数。


Details

详细信息----------Details----------

Function spantree finds a minimum spanning tree for dissimilarities (there may be several minimum spanning trees, but the function finds only one). Dissimilarities at or above the threshold toolong and NAs are disregarded, and the spanning tree is found through other dissimilarities. If the data are disconnected, the function will return a disconnected tree (or a forest), and the corresponding link is NA. Connected subtrees can be identified using distconnected.
功能spantree找到一个最小生成树的不同点(可能有以下几种最小生成树,但功能只找到一个)。四不像阈值以上toolong和NA的被忽视,而且通过生成树上有所不同。如果数据是断开的,该函数将返回一个断开连接的树(或森林),和相应的链接是NA。连接的子树可以识别使用distconnected。

Function cophenetic finds distances between all points along the tree segments. Function spandepth returns the depth of each node. The nodes of a tree are either leaves (with one link) or internal nodes (more than one link). The leaves are recursively removed from the tree, and the depth is the layer at with the leaf was removed. In disconnected spantree object (in a forest) each tree is analysed separately and disconnected nodes not in any tree have depth zero.
函数cophenetic发现的树段沿线各点之间的距离。函数spandepth返回的每个节点的深度。树的节点要么是叶子(一个链路)或内部节点(一个以上的链接)。叶子被递归从树中删除,和深度的层是在与叶片除去。在断开连接spantree对象(森林)每棵树分别进行分析和断开连接的树中的任何节点不具有深度为零。

Function plot displays the tree over a supplied ordination configuration, and lines adds a spanning tree to an ordination graph. If configuration is not supplied for plot, the function ordinates the cophenetic dissimilarities of the spanning tree and overlays the tree on this result. The default ordination function is sammon (package MASS), because Sammon scaling emphasizes structure in the neighbourhood of nodes and may be able to beautifully represent the tree (you may need to set dlim, and sometimes the results will remain twisted). These ordination methods do not work with disconnected trees, but you must supply the ordination configuration. Function lines will overlay the tree in an existing plot.
函数plot显示棵大树上提供的协调配置,和lines添加的协调图的生成树。如果配置为plot提供,功能协调cophenetic的不同点的生成树和覆盖树这样的结果。默认的协调功能是sammon(包MASS),因为Sammon缩放强调结构在附近的节点,可能是精美的代表树(您可能需要设置dlim有时结果将保持加捻)。这些协调方法不与断开树木,但你必须提供协调配置。函数lines将覆盖树在现有的图。

Function spantree uses Prim's method implemented as priority-first search for dense graphs (Sedgewick 1990). Function cophenetic uses function stepacross with option path = "extended". The spantree is very fast, but cophenetic is slow in very large data sets.
函数spantree使用Prim的方法实现为第一优先级的搜索稠密图(Sedgewick 1990年)。功能cophenetic使用函数stepacross的与选项“path = "extended"。 spantree是非常快的,但cophenetic是非常大的数据集缓慢。


值----------Value----------

Function spantree returns an object of class spantree which is a list with two vectors, each of length n-1. The number of links in a tree is one less the number of observations, and the first item is omitted. The items are  
功能spantree返回一个类的对象spantree这是一个列表,两个向量,每个的长度n-1。树中的链接的数目是一个观测值的数量少,并且省略的第一项。该项目是


参数:kid
The child node of the parent, starting from parent number two. If there is no link from the parent, value will be NA and tree is disconnected at the node.
子节点的父,从父排名第二的开始。如果没有链接从父,价值将是NA和断开连接的节点树。


参数:dist
Corresponding distance. If kid = NA, then dist = 0.
通讯距离。如果kid = NA,dist = 0的。


参数:labels
Names of nodes as found from the input dissimilarities.  
从输入相异的节点的名称。


参数:call
The function call.
函数调用。


注意----------Note----------

In principle, minimum spanning tree is equivalent to single linkage clustering that can be performed using hclust or agnes. However, these functions combine clusters to each other and the information of the actually connected points (the “single link”) cannot be recovered from the result. The graphical output of a single linkage clustering plotted with ordicluster will look very different from an equivalent spanning tree plotted with lines.spantree.
原则上,最小生成树是单连接聚类,可以使用hclust或agnes。然而,这些功能结合簇彼此和实际连接的点(“单链路”)的信息不能从结果回收。一个单一的联动聚类绘制的图形输出ordicluster会显得很不同的策划与lines.spantree从等效生成树。


(作者)----------Author(s)----------


Jari Oksanen



参考文献----------References----------



参见----------See Also----------

vegdist or dist for getting dissimilarities,  and hclust or agnes for single linkage clustering.
vegdist或dist为获得不同点,和hclust或agnes的单链聚类。


实例----------Examples----------


data(dune)
dis <- vegdist(dune)
tr <- spantree(dis)
## Add tree to a metric scaling [#添加树来度量的比例]
plot(tr, cmdscale(dis), type = "t")
## Find a configuration to display the tree neatly[找到一个配置显示整齐的树]
plot(tr, type = "t")
## Depths of nodes[#深渊的节点]
depths <- spandepth(tr)
plot(tr, type = "t", label = depths)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-27 02:25 , Processed in 0.032117 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表