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

R语言 YourCast包 plot.yourcast()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-2 07:39:26 | 显示全部楼层 |阅读模式
plot.yourcast(YourCast)
plot.yourcast()所属R语言包:YourCast

                                        Plot generation tool for YourCast
                                         图生成工具YourCast

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

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

Creates graphics from yourcast output for each geographical unit and prints to the device window or a .pdf file in
各地方单位创建yourcast输出的图形和打印设备窗口或一个PDF格式的文件


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


## S3 method for class 'yourcast'
plot(x, dpath=getwd(), dvlabel=NULL,
                          family="agetime",
                          args.matplot=list(),args.wireframe=list(),
                          time.insamp.obs=TRUE, time.insamp.predict=TRUE,
                          age.insamp.predict=TRUE,
                          threedim.insamp.predict=TRUE,
                          age.xlab=NULL, age.ylab=NULL,
                          time.xlab=NULL, time.ylab=NULL,
                          threedim.xlab=NULL, threedim.ylab=NULL,
                          threedim.zlab=NULL,
                          screen=list(z=-40, x=-60, y=0),
                          age.incl=NULL,
                          print="device",filename=NULL,...)



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

参数:x
yourcast output object
yourcast输出对象


参数:dpath
String. Directory where ".pdf" outputs are saved. Defaults to working directory if not specified. Will be ignored if print="device". Default: getwd()
字符串。所在的目录.pdf输出将被保存。默认如果没有指定工作目录。将被忽略print="device"。默认值:getwd()


参数:dvlabel
String. Description of dependent variable that will be used as the main title for the plots. Default: NULL
字符串。因变量的说明,将被用来作为主标题的图。默认值:NULL


参数:family
String. Specifies type of plot generated by the function.  "time" creates a time series plot where each age cohort is plotted separately on the device. "age" creates a plot of forecasts on age where data from each each year is plotted separately.  "agetime" creates a side-by-side presentation of the "age" and "time" plots. Finally, "threedim" creates a three-dimensional plot of the information in the ""age"" and ""time"" plots. Default: "agetime"
字符串。指定类型的函数生成的图。 "time"每个年龄组分别绘制在设备上创建了一个时间序列图。 "age"创建一个图的时代里,每个年度的数据分别绘制预测。 "agetime""age"和"time"图创建一个侧端表示。最后,"threedim"的信息创建一个三维图中的“年龄”和“时间”图。默认值:"agetime"


参数:args.matplot
List. A list of arguments (must be labeled) to be passed to matplot. For example, if wanted to turn change line weight, could add args.matplot=list(lwd=2). Does not apply to plots of family threedim. In most cases users will have to launch age and time plots separately for this feature to work well. Note that some arguments to matplot such as xlab and main should be made as arguments to plot.yourcast; they will be overwritten if found in args.matplot. For the moment, main is specified via the dvlabel argument.
列表。要传递给matplot的参数列表(必须标明)。例如,如果想将变化的线条粗细,可以添加args.matplot=list(lwd=2)。不适用于家庭threedim图。在大多数情况下,用户将不得不启动age和time图分别为功能正常工作。请注意,某些参数matplot如xlab和main应的参数plot.yourcast;如果发现args.matplot,它们将被覆盖。就目前而言,main指定通过dvlabel参数。


参数:args.wireframe
List. A list of arguments (must be labeled) to be passed to wireframe. This only applies to plots of the threedim family. Note that some arguments to wireframe such as zlab and screen should be made as arguments to plot.yourcast; they will be overwritten if found in args.wireframe.
列表。要传递给wireframe的参数列表(必须标明)。这仅适用于图的threedim家庭。请注意,某些参数wireframe如zlab和screen应的参数plot.yourcast;如果发现args.wireframe,它们将被覆盖。


参数:time.insamp.obs
Logical. For "time" and "time" plots in "agetime" plots, specifies whether observed values should be plotted within the range of years with observations for the dependent variable. Default: TRUE
逻辑。 "time"和时间"agetime"图的图,指定观测值是否应绘制年的范围内,为因变量的观测。默认值:TRUE


参数:time.insamp.predict
Logical. For "time" and "time" plots in "agetime" plots, specifies whether predicted values should be plotted within the range of years with observations for the dependent variable. For "time" plots, the default is to print both predicted and observed values; this option merely removes predicted values from this range if set to FALSE. Default: TRUE
逻辑。 "time"和时间"agetime"图的图,指定为因变量的观测范围内的年预测值是否应绘制。对于"time"图,默认的是打印的预测和观测值,此选项仅删除此范围内的预测值,如果设置为FALSE。默认值:TRUE


参数:age.insamp.predict
Logical. For "age" plots and the "age" plots of "agetime" plots, specifies whether predicted values should be plotted within the range of years with observations for the dependent variable. If set to FALSE, predicted values are replaced by observed values in this range.  Default: TRUE
逻辑。对于"age"的图和年龄"agetime"图图的预测值,指定是否应绘制因变量的观测范围内的年。如果设置为FALSE,预测值在此范围内的观测值所取代。默认值:TRUE


参数:threedim.insamp.predict
Logical. For "threedim" plots, specifies whether predicted values should be plotted within the range of years with observations for the dependent variable. If set to FALSE, predicted values are replaced by observed values in this range.  Default: TRUE
逻辑。 "threedim"图,指定为因变量的观测范围内的年预测值是否应绘制。如果设置为FALSE,预测值在此范围内的观测值所取代。默认值:TRUE


参数:age.xlab
String. The label for the "x" axis of "age" plots and the "age" plot of "agetime" plots. Will be ignored if "age" plot not created. Default: "Age"
字符串。标签为X轴"age"图和年龄图"agetime"图。如果没有创建年龄图,将被忽略。默认值:"Age"


参数:age.ylab
String. The label for the "y" axis of "age" plots and the "age" plot of "agetime" plots. Will be ignored if "age" plot not created. Default: "Forecasts"
字符串。标签为Y轴的"age"图,年龄图"agetime"图。如果没有创建年龄图,将被忽略。默认值:"Forecasts"


参数:time.xlab
String. The label for the "x" axis of "time" plots and the "time" plot of "agetime" plots. Will be ignored if "time" plot not created. Default: "Time"
字符串。标签为X轴的"time"图和"agetime"图“的图。如果没有创建“时间”图将被忽略。默认值:"Time"


参数:time.ylab
String. The label for the "y" axis of "time" plots and the "time" plot of "agetime" plots. Will be ignored if "time" plot not created. Default: "Data and     Forecasts"
字符串。标签为“Y”轴的"time"图和"agetime"图“的图。如果没有创建“时间”图将被忽略。默认值:"Data and     Forecasts"


参数:threedim.xlab
String. The label for the "x" axis of "threedim" plots. Will be ignored if "threedim" plot not created.  Default: "Year"
字符串。标签为X轴的"threedim"图。被忽略如果没有创建“threedim的图。默认值:"Year"


参数:threedim.ylab
String. The label for the "y" axis of "threedim" plots. Will be ignored if "threedim" plot not created.  Default: "Age"
字符串。 "threedim"图Y轴的标签。被忽略如果没有创建“threedim的图。默认值:"Age"


参数:threedim.zlab
String. The label for the "z" axis of "threedim" plots. Will be ignored if "threedim" plot not created.  Default: "Forecasts"
字符串。 "threedim"图Z轴的标签。被忽略如果没有创建“threedim的图。默认值:"Forecasts"


参数:screen
List. List with three elements "x", "y", and "z" that rotate the viewing angle for three dimensional plots. Argument ignored for all other plot types.  Default: list(z=-40, x=-60, y=0)
列表。有三个元素的X,Y,Z旋转视角三维图的列表。所有其他的图类型的参数被忽略。默认值:list(z=-40, x=-60, y=0)


参数:age.incl
Vector. If changed from NULL, subset of age groups to be included in the time series plot. Ages should be specified in the same way they are in the index.code argument to yourcast(). Default: NULL
向量。如果从NULL,年龄组的子集,包括在时间序列图。年龄应以同样的方式,他们是在index.codeyourcast()参数指定。默认值:NULL


参数:print
String. Specifies whether graphical output should be displayed sequentially on a device window ("device") or saved directly to a ".pdf" file in the dpath ("pdf").  Default: "device"
字符串。指定的图形输出是否应该按顺序显示设备上的窗口("device"),或直接保存到一个.pdf文件dpath("pdf")。默认值:"device"


参数:filename
Vector of strings. If changed from NULL, provides filenames for pdfs created from the graphical output for each geographical area. The order of the labels should be the same as the order of the areas in dataobj$data. Filenames will be recycled if the length of the vector is less than the number of areas.
向量的字符串。如果从NULL,提供了从图形输出为每个区域创建的PDF文件的文件名。的标签的顺序应该是相同的区域的顺序,在dataobj$data。的向量长度,如果是小于的区域的数量,将被回收利用的文件名。


参数:...
Arguments to be passed to par() for the purpose of setting graphical parameters for the plotting functions. See help(par) for more details.   
参数被传递给杆()的图形参数设置的绘图功能的目的。见help(par)更多详情。


Details

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

Prints sequentially to the device or saves ".pdf" files with the requested plot for each geographic unit in the sample. If requested, ".pdf" files will be saved in a specified directory or the working directory. Three-dimensional plots are created with the wireframe function from the lattice library.  For space considerations, axes are labeled with the numerical versions of the "age" and "time" vectors regardless of whether A.names and T.names are supplied to yourcast.
打印顺序的设备或储存的.pdf文件要求的样品中各GEO单元的图。如果有要求,.pdf的文件将被保存在指定的目录或工作目录。创建三维图的wireframe函数从lattice库中。对于空间的考虑,的轴都标有数字版本的“年龄”和“时间”向量无论是否A.names和T.names是yourcast。

Plots are titled with the dvlabel and the G.names dataframe if it was supplied to yourcast in the dataobj.  For example if dvlabel="Respiratory Infections" and the geographic identifier for that region is matched with "Belize", the plot will be titled “Respiratory Infections, Belize”. One or both labels will be utilized by the function if available.
图被冠名为dvlabel和G.names数据框,如果它是提供给yourcast在dataobj。例如,如果dvlabel="Respiratory Infections"和该区域的GEO标识符匹配"Belize",该图将被“呼吸道感染,伯利兹”。将利用可用的功能,如果其中一个或两个标签。

Axis labels can be changed with the appropriate xlab, ylab, and zlab arguments.
轴标签是可以改变的,适当的xlab,ylab和zlab参数。

It is important to note that plot.yourcast will only work if all cross sections within the same geographic unit are of the same dimensions. If, for example, a cross section for one age group has fewer yearly observations than another from the same group, these missing years must be filled in with NA, even if they occur in the beginning of the sample period. This does not hold across geographic units, however.
重要的是要注意,plot.yourcast只会工作,如果在同一GEO单元所有横截面是相同的尺寸的。例如,如果一个横截面为一个年龄组有较少的每年比另一个来自同一组的观察,这些失踪多年的必须填写与NA,即使它们发生在采样周期的开始。这并不持有不同GEO单元,但是。

Finally, plot.yourcast handles "agetime" plots differently than the other families by opening a new device window for each new plot. This is done so that the size of the device can be controlled to keep the side-by-side plots from appearing distorted when launched. This convenience makes it impossible to place multiple plots on the same device, however. Users seeking to create 1x2, 2x2, 3x2, etc., plot layouts for the purposes of comparison are advised to use the separate "age" and "time" plot families and print each plot indivudally to the device.
最后,plot.yourcast处理"agetime"图不同于其他家庭开辟了一条新设备窗口为每一个新的图。这是这样做的移动设备的尺寸的可控制启动时,从外观的失真保持侧侧图。这种便利使得它不可能将多条曲线在同一设备上,但是。用户创建有1x2,2x2的,3X2等,,图布局比较而言,建议使用独立的"age"和"time"图家庭,打印每个小区indivudally的设备。

Below is some example code for a 2x2 plot layout with, in effect, two "agetime" plots:
下面是一些示例代码,一个2x2的图布局,实际上,两个人的agetime图:


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

Device windows with requested plots or ".pdf" files saved
设备要求的图或.pdf的文件保存窗口


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


Jon Bischof <a href="mailto:jbischof@fas.harvard.edu">jbischof@fas.harvard.edu</a>



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

<h3>See Also</h3>  <code>yourcast</code> function and documentation
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 04:07 , Processed in 0.032656 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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