tile(vcd)
tile()所属R语言包:vcd
Tile Plot
瓷砖图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Plots a tile display.
绘制瓷砖显示器。
用法----------Usage----------
## Default S3 method:[默认方法]
tile(x,
tile_type = c("squaredarea", "area", "height", "width"),
halign = c("left", "center", "right"),
valign = c("bottom", "center", "top"),
split_vertical = NULL,
shade = FALSE,
spacing = spacing_equal(unit(1, "lines")),
set_labels = NULL,
margins = unit(3, "lines"),
keep_aspect_ratio = FALSE,
legend_width = NULL,
squared_tiles = TRUE,
main = NULL, sub = NULL, ...)
## S3 method for class 'formula'[类formula的方法]
tile(formula, data,
..., main = NULL, sub = NULL, subset = NULL, na.action = NULL)
参数----------Arguments----------
参数:x
a contingency table, or an object coercible to one.
列联表,或转换成一个对象。
参数:formula
a formula specifying the variables used to create a contingency table from data </table>
一个公式指定data</ TABLE创建一个列联表使用的变量>
参数:data
either a data frame, or an object of class "table" or "ftable".
一个数据框,或对象类"table"或"ftable"的。
参数:subset
an optional vector specifying a subset of observations to be used.
一个可选的向量指定要使用的观测值的一个子集。
参数:na.action
a function which indicates what should happen when the data contain NAs. Ignored if data is a contingency table.
一个函数,它表示当数据包含NA的,应该发生什么。如果忽略data是一个列联表。
参数:tile_type
character string indicating how the tiles should reflect the table frequencies (see details).
字符串说明,瓷砖应如何反映表的频率(见详情)。
参数:halign, valign
character string specifying the horizontal and vertical alignment of the tiles.
字符的字符串指定的水平和垂直取向的瓷砖。
参数:split_vertical
vector of logicals of length k, where k is the number of margins of x (values are recycled as needed). A TRUE component indicates that the tile(s) of the corresponding dimension should be split vertically, FALSE means horizontal splits. Default is FALSE.
向量,逻辑值的长度k,其中k的利润是多少x(值被回收)。 ATRUE组件的相应尺寸的瓷砖(S)应垂直分割,:FALSE是指水平分割。默认是FALSE.
参数:spacing
spacing object, spacing function, or corresponding generating function (see strucplot for more information).
间隔对象,间距功能,或相应的生成函数(见strucplot的详细信息)。
参数:set_labels
An optional character vector with named components replacing the so-specified variable names. The component names must exactly match the variable names to be replaced.
一个可选的字符向量更换指定的变量名命名的组件。组件名称必须完全匹配被替换的变量名。
参数:shade
logical specifying whether shading should be enabled or not (see strucplot).
逻辑指定是否着色,应启用与否(见strucplot“)。
参数:margins
either an object of class "unit" of length 4, or a numeric vector of length 4. The elements are recycled as needed. The four components specify the top, right, bottom, and left margin of the plot, respectively. When a numeric vector is supplied, the numbers are interpreted as "lines" units. In addition, the unit or numeric vector may have named arguments (top, right, bottom, and left), in which case the non-named arguments specify the default values (recycled as needed), overloaded by the named arguments.
无论是类的一个对象"unit"长度为4,或一个数值向量的长度为4。被回收作为需要的元素。的四个组成部分指定的顶部,右,底部,和左边缘的图。当一个数值向量被提供时,被解释为数字"lines"单位。此外,已命名的单位或数字矢量参数(top,right,bottom和left),在这种情况下,非参数指定默认值超载的命名参数的值(如需要回收),。
参数:legend_width
An object of class "unit" of length 1 specifying the width of the legend (if any). Default: 5 lines.
对象的类"unit"长度为1的指定宽度的传说(如有)。默认值:5号线。
参数:keep_aspect_ratio
logical indicating whether the aspect ratio should be fixed or not. The default is FALSE to enable the creation of squared tiles.
逻辑表示的纵横比是否应该是固定的或不。默认为FALSE使创建的平方瓷砖。
参数:squared_tiles
logical indicating whether white space should be added as needed to rows or columns to obtain squared tiles in case of an unequal number of row and column labels.
逻辑表明,不管是白色的空间,应根据需要添加行或列的平方瓷砖的情况下不等数量的行和列标签。
参数:main, sub
either a logical, or a character string used for plotting the main (sub) title. If logical and TRUE, the name of the data object is used.
无论是一个逻辑,或字符串,用于绘制主(分)标题。如果逻辑和TRUE,的名称data对象使用。
参数:...
Other arguments passed to strucplot
其他参数传递给strucplot
Details
详细信息----------Details----------
A tile plot is a matrix of tiles. For each tile, either the "width", "height", "area", or squared area is proportional to the corresponding entry. The first three options allow column-wise, row-wise and overall comparisons, respectively. The last variant allows to compare the tiles both column-wise and row-wise, considering either the width or the height, respectively.
瓷砖图是一个矩阵的瓷砖。对于每一瓦片,要么"width","height","area",或平方的面积正比于相应的条目。前三个选项允许逐列,行明智的,整体比较,分别。最后一个变体允许的瓷砖列聪明和明智的行,考虑的宽度或高度,分别进行比较。
In contrast to other high-level strucplot functions, tile also accepts a table with duplicated levels (see examples). In this case, artificial dimnames will be created, and the actual ones are drawn using set_labels.
到其他高层次strucplot的功能,tile也接受一个表复制的水平(参见示例)。在这种情况下,人工dimnames将被创建,并绘制实际的使用set_labels。
Note that multiway-tables are first “flattened” using structable.
需要注意的是多路表的第一个“扁平化”structable。
值----------Value----------
The "structable" visualized is returned invisibly.
"structable"返回的可视化是不可见的。
(作者)----------Author(s)----------
David Meyer <a href="mailtoavid.Meyer@R-project.org">David.Meyer@R-project.org</a>
参见----------See Also----------
assoc, strucplot, mosaic, structable,
assoc,strucplot,mosaic,structable,
实例----------Examples----------
data("Titanic")
## default plot[#默认打印]
tile(Titanic)
tile(Titanic, type = "expected")
tile(Titanic, shade = TRUE)
## some variations[#的一些变化]
tile(Titanic, tile_type = "width", squared_tiles = FALSE)
tile(Titanic, tile_type = "height", squared_tiles = FALSE)
tile(Titanic, tile_type = "area", halign = "center", valign = "center")
## repeat levels[#重复水平]
tile(Titanic[,,,c(1,2,1,2)])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|