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

R语言 vcd包 spine()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 14:51:11 | 显示全部楼层 |阅读模式
spine(vcd)
spine()所属R语言包:vcd

                                        Spine Plots and Spinograms
                                         脊柱图和Spinograms,

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

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

Spine plots are a special cases of mosaic plots, and can be seen as a generalization of stacked (or highlighted) bar plots. Analogously, spinograms are an extension of histograms.
脊柱的马赛克图图是一种特殊情况下,可以被看作是一个概括的堆栈(或突出显示)条形图。类似地,spinograms是一个延长直方图。


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


spine(x, ...)
## Default S3 method:[默认方法]
spine(x, y = NULL,
  breaks = NULL, ylab_tol = 0.05, off = NULL,
  main = "", xlab = NULL, ylab = NULL, ylim = c(0, 1), margins = c(5.1, 4.1, 4.1, 3.1),
  gp = gpar(), name = "spineplot", newpage = TRUE, pop = TRUE,
  ...)
## S3 method for class 'formula'[类formula的方法]
spine(formula, data = list(),
  breaks = NULL, ylab_tol = 0.05, off = NULL,
  main = "", xlab = NULL, ylab = NULL, ylim = c(0, 1), margins = c(5.1, 4.1, 4.1, 3.1),
  gp = gpar(), name = "spineplot", newpage = TRUE, pop = TRUE,
  ...)



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

参数:x
an object, the default method expects either a single variable (interpreted to be the explanatory variable) or a 2-way table. See details.
一个对象,默认的方法预期一个变量(解释为解释变量)或一个2路表。查看详细信息。


参数:y
a "factor" interpreted to be the dependent variable
"factor"解释为因变量


参数:formula
a "formula" of type y ~ x with a single dependent "factor" and a single explanatory variable.     
一个"formula"类型的y ~ x一个单一的依赖"factor"和一个单一的解释变量。


参数:data
an optional data frame.
一个可选的数据框。


参数:breaks
if the explanatory variable is numeric, this controls how it is discretized. breaks is passed to hist and can be a list of arguments.
如果解释变量是数字的,离散控制。 breaks传递给hist可以是一个参数列表。


参数:ylab_tol
convenience tolerance parameter for y-axis annotation. If the distance between two labels drops under this threshold, they are plotted equidistantly.
y轴注解的便利性参数。如果两个标签之间的距离降到该阈值下,它们等距离地绘制。


参数:off
vertical offset between the bars (in per cent). It is fixed to 0 for spinograms and defaults to 2 for spine plots.
之间的垂直偏移的条形(%)。为spinograms,默认为0脊柱图被固定为2。


参数:main, xlab, ylab
character strings for annotation
字符串注释


参数:ylim
limits for the y axis
y轴的限制


参数:margins
margins when calling plotViewport
利润时调用plotViewport


参数:gp
a "gpar" object controlling the grid graphical parameters of the rectangles. It should specify in particular a vector of fill colors of the same length as levels(y). The default is to call gray.colors.   
一个"gpar"对象的矩形网格图形参数控制。它应该特别指定的向量fill颜色相同的长度levels(y)。默认值是调用“gray.colors。


参数:name
name of the plotting viewport.
绘制视口的名称。


参数:newpage
logical. Should grid.newpage be called  before plotting?
逻辑。 grid.newpage被称为打印之前?


参数:pop
logical. Should the viewport created be popped?
逻辑。如果视口创建弹出?


参数:...
additional arguments passed to plotViewport.
额外的参数传递给plotViewport。


Details

详细信息----------Details----------

spine creates either a spinogram or a spine plot. It can be called via spine(x, y) or spine(y ~ x) where y is interpreted to be the dependent variable (and has to be categorical) and x the explanatory variable. x can be either categorical (then a spine plot is created) or numerical (then a spinogram is plotted). Additionally, spine can also be called with only a single argument which then has to be a 2-way table, interpreted to correspond to table(x, y).
spine创建一个spinogram的或脊柱图的。通过它可以被称为spine(x, y)或spine(y ~ x)y被解释为因变量(是分类)和x的解释变量。 x可以是绝对的(当时的脊椎图)或数字(然后绘制一个spinogram)。此外,spine也可以被称为只有一个参数,它是一个2路表,解释为对应于table(x, y)。

Spine plots are a generalization of stacked bar plots where not the heights but the widths of the bars corresponds to the relative frequencies of x. The heights of the bars then correspond to the conditional relative frequencies of y in every x group. This is a special case of a mosaic plot with specific spacing and shading.
脊柱图是一个概括的条形不高但宽度对应的相对频率x堆叠横条图。条形的高度,然后对应y在每x组中的有条件的相对频率。这是一个特殊的情况下,与特定的间隔和阴影的马赛克图。

Analogously, spinograms extend stacked histograms. As for the histogram, x is first discretized (using hist) and then for the discretized data a spine plot is created.
类似地,spinograms扩展堆叠柱状图。的直方图,x是第一个离散(使用hist),然后创建的脊椎曲线的离散化数据。


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

The table visualized is returned invisibly.
返回的表可视化于无形。


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



Achim Zeileis <a href="mailto:Achim.Zeileis@R-project.org">Achim.Zeileis@R-project.org</a>




参考文献----------References----------

Computational Statistics, 11, 23&ndash;33.
conditional distributions, Unpublished Manuscript.

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

cd_plot, mosaic, hist
cd_plot,mosaic,hist


实例----------Examples----------


## Arthritis data (dependence on a categorical variable)[#关节炎的数据(依赖于分类变量)]
data("Arthritis")
(spine(Improved ~ Treatment, data = Arthritis))

## Arthritis data (dependence on a numerical variable)[#关节炎的数据(依赖于数值变量)]
(spine(Improved ~ Age, data = Arthritis, breaks = 5))
(spine(Improved ~ Age, data = Arthritis, breaks = quantile(Arthritis$Age)))
(spine(Improved ~ Age, data = Arthritis, breaks = "Scott"))

## Space shuttle data (dependence on a numerical variable)[#航天飞机的数据(依赖于数值变量)]
data("SpaceShuttle")
(spine(Fail ~ Temperature, data = SpaceShuttle, breaks = 3))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 08:21 , Processed in 0.043373 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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