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

R语言:strip.default()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 21:49:39 | 显示全部楼层 |阅读模式
strip.default(lattice)
strip.default()所属R语言包:lattice

                                        Default Trellis Strip Function
                                         默认格子地带功能

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

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

strip.default is the function that draws the strips by default in Trellis plots.  Users can write their own strip functions, but most commonly this involves calling strip.default with a slightly different arguments.  strip.custom provides a convenient way to obtain new strip functions that differ from strip.default only in the default values of certain arguments.
strip.default是功能,默认情况下,绘制网格图中的条状。用户可以编写自己的的带钢功能,但最常用这涉及到调用strip.default略有不同的论点。 strip.custom提供了一个方便的方式来获得新的带功能,从strip.default只在某些参数的默认值不同。


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


strip.default(which.given,
              which.panel,
              var.name,
              factor.levels,
              shingle.intervals,
              strip.names = c(FALSE, TRUE),
              strip.levels = c(TRUE, FALSE),
              sep = " : ",
              style = 1,
              horizontal = TRUE,
              bg = trellis.par.get("strip.background")$col[which.given],
              fg = trellis.par.get("strip.shingle")$col[which.given],
              par.strip.text = trellis.par.get("add.text"))
strip.custom(...)



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

参数:which.given
integer index specifying which of the conditioning variables this strip corresponds to.   
整数索引指定带对应的调节变量。


参数:which.panel
vector of integers as long as the number of conditioning variables. The contents are indices specifying the current levels of each of the conditioning variables (thus, this would be unique for each distinct packet).  This is identical to the return value of which.packet, which is a more accurate name.  
只要作为调节变量的数目整数向量。内容是指数指定每个调节变量(因此,这将是唯一为每个不同的数据包)目前的水平。这是which.packet,这是一个更准确的名称返回值相同。


参数:var.name
vector of character strings or expressions as long as the number of conditioning variables.  The contents are interpreted as names for the conditioning variables.  Whether they are shown on the strip depends on the values of strip.names and style (see below).  By default, the names are shown for shingles, but not for factors.  
只要作为调节变量的字符串或表达向量。作为调节变量的名称解释的内容。取决于他们是否对加沙地带显示strip.names和style(见下文)。值默认情况下,名称显示为带状疱疹,但不适合因素。


参数:factor.levels
vector of character strings or expressions giving the levels of the conditioning variable currently being drawn.  For more than one conditioning variable, this will vary with which.given.  Whether these levels are shown on the strip depends on the values of strip.levels and style (see below).  factor.levels may be specified for both factors and shingles (despite the name), but by default they are shown only for factors.  If shown, the labels may optionally be abbreviated by specifying suitable components in par.strip.text (see xyplot)  
目前正在绘制字符串或提供空调变量的水平表达向量。对于多个空调变量,这将改变与which.given。无论这些水平上条取决于strip.levels和style(见下文)。值factor.levels可能被指定为这两个因素和带状疱疹(尽管名称),但默认情况下,他们只为因素。如果标签显示,可以选择缩写指定合适的组件(参见par.strip.textxyplot)


参数:shingle.intervals
if the current strip corresponds to a shingle, this should be a 2-column matrix giving the levels of the shingle. (of the form that would be produced by printing levels(shingle)). Otherwise, it should be NULL  
如果当前的带钢对应到挂牌,这应该是一个2列的矩阵,使各级挂牌。 (形式将生产印刷levels(shingle))。否则,它应该是NULL


参数:strip.names
a logical vector of length 2, indicating whether or not the name of the conditioning variable that corresponds to the strip being drawn is to be written on the strip. The two components give the values for factors and shingles respectively.  This argument is ignored for a factor when style is not one of 1 and 3.  
逻辑的向量,一个长度为2条正在制定对应的调节变量的名称是否是书面上带。这两个组件提供的值分别为因素和带状疱疹。此参数将被忽略的一个因素时,style是不是1和3。


参数:strip.levels
a logical vector of length 2, indicating whether or not the level of the conditioning variable that corresponds to the strip being drawn is to be written on the strip.  The two components give the values for factors and shingles respectively.  
一个长度为2的逻辑向量,指示水平的调节变量,对应于正在制定带钢与否是书面上带。这两个组件提供的值分别为因素和带状疱疹。


参数:sep
character or expression, serving as a separator if the name and level are both to be shown.  
作为分隔字符或表达式,服务的名称和水平都显示。


参数:style
integer, with values 1, 2, 3, 4 and 5 currently supported, controlling how the current level of a factor is encoded. Ignored for shingles (actually, when shingle.intervals is non-null.    The best way to find out what effect the value of style has is to try them out. Here is a short description: for a style value of 1, the strip is colored in the background color with the strip text (as determined by other arguments) centered on it. A value of 3 is the same, except that a part of the strip is colored in the foreground color, indicating the current level of the factor. For styles 2 and 4, the part corresponding to the current level remains colored in the foreground color, however, for style = 2, the remaining part is not colored at all, whereas for 4, it is colored with the background color. For both these, the names of all the levels of the factor are placed on the strip from left to right. Styles 5 and 6 produce the same effect (they are subtly different in S, this implementation corresponds to 5), they are similar to style 1, except that the strip text is not centered, it is instead positioned according to the current level.  Note that unlike S-PLUS, the default value of style is 1. strip.names and strip.levels have no effect if style is not 1 or 3.  
整数,值1,2,3,4和5,目前支持的编码控制的一个因素,目前的水平如何。忽略了带状疱疹(实际上,当shingle.intervals非空的最佳方法,以找出什么样的影响style是尝试出来的价值,这里是一个简短的描述:一个样式值。 1,带色条文字居中(其他参数决定)的背景颜色。3的值是相同的,除了带的一部分前景色的颜色,表明对于样式2和4。目前水平的因素,部分对应到目前的水平仍然在彩色前景色,但是,风格= 2,其余部分是着色,而4,它是彩色的背景颜色。对于这两个因子的所有水平的名称放在从左至右带5和6样式产生同样的效果(他们有微妙的不同,实施对应5)它们是类似的风格,除了带文字不集中,它被定位,而不是按照目前的水平。注意,不像,S-PLUS,style默认值是1。strip.names和strip.levels有没有影响style如果不是1或3。


参数:horizontal
logical, specifying whether the labels etc should be horizontal.  horizontal=FALSE is useful for strips on the left of panels using strip.left=TRUE  
逻辑,指定的标签等是否应该水平。 horizontal=FALSE是非常有用的左侧面板上使用strip.left=TRUE条


参数:par.strip.text
list with parameters controlling the text on each strip, with components col, cex, font, etc.  
名单中的参数控制每个带文本组件col,cex,font等,


参数:bg
strip background color.  
去掉背景颜色。


参数:fg
strip foreground color.  
剥夺前景色。


参数:...
arguments to be passed on to strip.default, overriding whatever value it would have normally assumed  
参数被传递给strip.default,覆盖任何价值将通常假定


Details

详情----------Details----------

default strip function for trellis functions. Useful  mostly because of the style argument — non-default styles are often more informative, especially when the names of the levels of the factor x are small. Traditional use is as strip = function(...) strip.default(style=2,...), though this can be simplified by the use of strip.custom.
网格功能的默认带的功能。主要是因为有用的style参数 - 非默认的样式往往更多的信息,尤其是当因素x水平的名称是小。传统使用的是strip = function(...) strip.default(style=2,...),虽然这可以通过使用strip.custom简化。


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

strip.default is called for its side-effect, which is to draw a strip appropriate for multi-panel Trellis conditioning plots. strip.custom returns a function that is similar to strip.default, but with different defaults for the arguments specified in the call.
strip.default被称为它的副作用,这是适用于多面板的网格空调图绘制一个带。 strip.custom返回一个函数,它是类似strip.default,但不同的默认调用中指定的参数。


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


Deepayan Sarkar <a href="mailtoeepayan.Sarkar@R-project.org">Deepayan.Sarkar@R-project.org</a>



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

xyplot, Lattice
xyplot,Lattice


举例----------Examples----------


## Traditional use[#传统使用]
xyplot(Petal.Length ~ Petal.Width | Species, iris,
       strip = function(..., style) strip.default(..., style = 4))

## equivalent call using strip.custom[#相当于呼叫使用strip.custom]
xyplot(Petal.Length ~ Petal.Width | Species, iris,
       strip = strip.custom(style = 4))

xyplot(Petal.Length ~ Petal.Width | Species, iris,
       strip = FALSE,
       strip.left = strip.custom(style = 4, horizontal = FALSE))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 12:18 , Processed in 0.019715 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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