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.
逻辑。标签返回的set总是具有相同的长度作为树中的节点的数目。 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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|