labels.rpart(rpart)
labels.rpart()所属R语言包:rpart
Create Split Labels For an Rpart Object
创建分割对于软件rpart对象标签
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function provides labels for the branches of an rpart tree.
此功能提供标签rpart树的树枝。
用法----------Usage----------
## S3 method for class 'rpart'
labels(object, digits=4, minlength=1L, pretty, collapse=TRUE, ...)
参数----------Arguments----------
参数:object
fitted model object of class rpart. This is assumed to be the result of some function that produces an object with the same named components as that returned by the rpart function.
拟合模型对象类rpart。这被认为是一些功能,产生一个具有相同的命名组件对象rpart函数返回的结果。
参数:digits
the number of digits to be used for numeric values. All of the rpart functions that call labels explicitly set this value, with options("digits") as the default.
数值的数字。所有rpart标签明确设定options("digits")作为默认值,函数调用的。
参数:minlength
the minimum length for abbreviation of character or factor variables. If 0 no abbreviation is done; if 1 then single letters are used with "a" for the first level, "b" for the second and so on. If the value is greater than 1, the abbreviate function is used.
最小长度的字符或因素变量的缩写。如果为0,没有缩写是,如果用1,那么单个字母"a"为第一级,"b"为第二等。如果该值大于1,abbreviate功能。
参数:pretty
an argument included for backwards compatibility: pretty=0 implies minlength=0, pretty=NULL implies minlength=1, and pretty=TRUE implies minlength=4.
向后兼容性参数包括:pretty=0指minlength=0,pretty=NULL指minlength=1和pretty=TRUE指minlength=4。
参数:collapse
logical. The returned set of labels is always of the same length as the number of nodes in the tree. If collapse=TRUE (default), the returned value is a vector of labels for the branch leading into each node, with "root" as the label for the top node. If FALSE, the returned value is a two column matrix of labels for the left and right branches leading out from each node, with "leaf" as the branch labels for terminal nodes.
逻辑。返回的标签集始终是树中的节点数量相同的长度。 collapse=TRUE如果(默认),返回值是一个领导到每个节点的分支标签的向量,"root"顶级节点的标签。如果FALSE,返回值是一个两列的矩阵分行领导从每个节点的左边和右边的标签,"leaf"作为终端节点的分支标签。
参数:...
optional arguments to abbreviate.
abbreviate可选参数。
值----------Value----------
Vector of split labels (collapse=TRUE) or matrix of left and right splits (collapse=FALSE) for the supplied rpart object. This function is called by printing methods for rpart and is not intended to be called directly by the users.
矢量分裂标签所提供的collapse=TRUE对象(collapse=FALSE)或矩阵的左,右分裂(rpart)。此功能被称为rpart“不打算被称为由用户直接打印的方法。
参见----------See Also----------
abbreviate
abbreviate
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|