labels(sets)
labels()所属R语言包:sets
Labels from objects
从对象的标签
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates “nice” labels from objects.
创建“好”的标签对象。
用法----------Usage----------
LABELS(x, max_width = NULL, dots = "...", unique = FALSE, limit = NULL, ...)
LABEL(x, limit = NULL, ...)
## S3 method for class 'character'
LABEL(x, limit = NULL, quote = sets_options("quote"), ...)
参数----------Arguments----------
参数:x
For LABELS, a vector of R objects (if the object is not a vector, it is converted using as.list). For LABEL, an R object.
对于LABELS,一个向量R对象(如果该对象是一个矢量,它被转换使用as.list“)。对于LABEL,R对象。
参数:max_width
Integer vector (recycled as needed) specifying the maximum label width for each component of x. If NULL, there is no limit, otherwise, the label will be truncated to max_width.
整数向量(根据需要回收)指定的最大标签宽度每个组件的x。如果NULL,有没有限制,否则,标签将被截断为max_width。
参数:dots
A character string appended to a truncated label. If NULL, nothing is appended.
一个字符串附加到一个被截断的标签。如果NULL,就不追加。
参数:unique
Logical indicating whether make.unique should be called on the final result.
逻辑表明是否make.unique应该被称为最后的结果。
参数:limit
Maximum length of vectors or sets to be represented as is. Longer elements will be replaced by a label.
向量或成套的最大长度被表示为是。更长的元素将被替换为一个标签。
参数:quote
Should character strings be quoted, or not? (default: TRUE)
如果字符串被引用,或不是吗? (默认:TRUE)
参数:...
Optional arguments passed to the LABEL methods.
可选参数传递给LABEL方法。
值----------Value----------
A character vector of labels generated from the supplied object(s). LABELS first checks whether the object has names and uses these if any; otherwise, LABEL is called for each element to generate a “short” representation.
从提供的对象(S)的标签字符向量。 LABELS首先检查是否对象的名称,并使用这些如果有的话,否则,LABEL的每个元素调用产生一个“短”表示。
LABEL is generic to allow user extensions. The current methods return the result of format if the argument is of length 1 (for objects of classes set and tuple: by default of length 5), and create a simple class information otherwise.
LABEL是通用的,允许用户扩展。目前的方法返回的结果format长度为1(如果参数是对象的类set和tuple:默认情况下,长度为5),并创建一个简单的类信息,否则。
实例----------Examples----------
LABELS(list(1, "test", X = "1", 1:5))
LABELS(set(X = as.tuple(1:20), "test", list(list(list(1,2)))))
LABELS(set(pair(1,2), set("a", 2), as.tuple(1:10)))
LABELS(set(pair(1,2), set("a", 2), as.tuple(1:10)), limit = 11)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|