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

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

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

                                        Plot Word Frequency Spectra (zipfR)
                                         图单词出现的频率谱(zipfR)

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

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

Plot a word frequency spectrum, or a comparison of several word frequency spectra, either as a side-by-side barplot or as points and lines on various logarithmic scales.
画出一个字的频谱,或几个词语的频谱进行比较,无论是作为一个的侧侧barplot或作为各种对数标度上的点和线。


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



  ## S3 method for class 'spc'
plot(x, y, ...,
       m.max=if (log=="") 15 else 50,
       log="", conf.level=.95,
       bw=zipfR.par("bw"), points=TRUE,
       xlim=NULL, ylim=NULL,
       xlab="m", ylab="V_m", legend=NULL,
       main="Frequency Spectrum",
       barcol=NULL, pch=NULL, lty=NULL, lwd=NULL, col=NULL)




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

参数:x, y, ...
one or more objects of class spc, representing observed or expected frequency spectra to be plotted
一个或多个对象类spc,观察到的或预期的频谱被绘制


参数:m.max
number of frequency classes that will be shown in plot. The default is 15 on linear scale and 50 when using any type of logarithmic scale.
的频率将显示在图的类。默认值是15,线性度和50当使用任何类型的对数刻度。


参数:log
a character string specifying the axis or axes for which logarithmic scale is to be used ("x", "y", or "xy"), similar to the log argument of plot.default.  By default, a barplot on linear scale is displayed.  Use log="" to show non-logarithmic points-and-lines plot (also see "Details" below).
一个字符串指定要使用对数刻度("x","y"或"xy"),类似的log参数<X轴或轴>。默认情况下,线性度barplot上显示出来。使用plot.default显示非对数的点和线图(请参阅下面的“详细信息”)。


参数:conf.level
confidence level for confidence intervals in logarithmic plots (see "Details" below).  The default value of .95 produces 95%-confidence intervals.  Set to NA in order to suppress confidence interval markers.
在对数图的置信区间的置信水平(见下面的“详细信息”)。 生产.95的默认值95%置信区间。设置为NA,以抑制置信区间标记。


参数:bw
if TRUE, draw plot in B/W style (default is the global zipfR.par setting)
如果TRUE,画在B / W风格的图(默认是全球zipfR.par)


参数:points
if TRUE, spectrum plots on any type of logarithmic scale are drawn as overplotted lines and points (default).  Otherwise, they are drawn as lines with different styles.
如果TRUE,任何类型的对数刻度上绘制频谱图overplotted点和线(默认)。否则,他们画线,不同的风格。


参数:xlim, ylim
visible range on x- and y-axis.  The default values are automatically determined to fit the selected data in the plot.
可见光范围在x-和y-轴。默认值是自动确定,以适应所选数据中的图。


参数:xlab, ylab
labels for the x-axis and y-axis.  The default values nicely typeset mathematical expressions.  The y-axis label also distinguishes between observed and expected frequency spectra.
的x-轴和y-轴的标签。的默认值很好地排版的数学表达式。 y轴的标签,还可以区分观察到的和预期的频谱。


参数:main
a character string or expression specifying a main title for the plot
字符串或表达式,指定一个主标题为图


参数:legend
optional vector of character strings or expressions, specifying labels for a legend box, which will be drawn in the upper right-hand corner of the screen.  If legend is given, its length must correspond to the number of frequency spectra in the plot.
可选的矢量字符的字符串或表达式,指定一个传奇框的标签,这将是绘制在屏幕的右上角上。如果legend,它的长度必须符合的频谱中的图。


参数:barcol, pch, lty, lwd, col
style vectors that can be used to override the global styles defined by zipfR.par.  If these vectors are specified, they must contain at least as many elements as there are frequency spectra in the plot: the values are not automatically recycled.
风格向量,可以用于覆盖全局样式定义的zipfR.par。如果指定了这些向量,他们必须至少包含许多元素有频谱中的图:值不会自动回收。


Details

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

By default, the frequency spectrum or spectra are represented as a barplot, with both axes using linear scale.  If the log parameter is given, the spectra are shown either as lines in different styles (points=FALSE) or as overplotted points and lines (point=TRUE).  The value of log specifies which axes should use logarithmic scale (specify log="" for a points-and-lines plot on linear scale).
缺省情况下,频谱或光谱作为barplot表示,与使用线性标度的两个轴。如果log参数,光谱线在不同的样式(points=FALSE),或作为overplotted的点和线(point=TRUE)。 log的值指定的坐标轴应使用对数刻度(指定log=""线性度的点和线的图)。

In y-logarithmic plots, frequency classes with V_m = 0 are drawn outside the plot region (below the bottom margin) rather than skipped.
在y轴的对数图,频率类的V_m = 0引起外界的图区域(下面的底部边缘),而不是跳过。

In all logarithmic plots, confidence intervals are indicated for expected frequency spectra with variance data (by vertical lines with T-shaped hooks at both ends).  The size of the confidence intervals is controlled by the conf.level parameter (default: 95%).  Set conf.level=NA in order to suppress the confidence interval indicators.
在所有的对数图,置信区间为预期的频谱与的方差数据(T-形钩在两端的垂直线与)表示。置信区间的大小的控制由conf.level参数(默认值:95%)。设置conf.level=NA为了抑制的置信区间指标。

Line and point styles, as well as bar colours in the barplot, can be defined globally with zipfR.par.  They can be overridden locally with the optional parameters barcol, pch, lty, lwd and col, but this should only be used when absolutely necessary.  In most cases, it is more advisable to change the global settings temporarily for a sequence of plots.
在全球范围内zipfR.par线和点样式,以及在barplot条的颜色,可以定义。他们可以覆盖本地的可选参数barcol,pch,lty,lwd和col,但是这应该只用在绝对必要的。在大多数情况下,它是更明智的全局设置临时改变为一个序列图。

The bw parameter is used to switch between B/W and colour modes.  It can also be set globally with zipfR.par.
bw参数使用B /黑白和彩色模式之间切换。它可以在全球范围内也可以设置zipfR.par。


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

spc, lnre, lnre.spc, plot.tfl, plot.vgc, zipfR.par, zipfR.plotutils
spc,lnre,lnre.spc,plot.tfl,plot.vgc,zipfR.par,zipfR.plotutils


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



## load Italian ultra- prefix data[#加载意大利超前缀数据]
data(ItaUltra.spc)

## plot spectrum[#图谱]
plot(ItaUltra.spc)

## logarithmic scale for m (more elements are plotted)[#米(对数刻度绘制更多的元素)]
plot(ItaUltra.spc,log="x")

## just lines[#只是行]
plot(ItaUltra.spc,log="x",points=FALSE)

## just the first five elements, then the first 100[#只是五行,那么第一个100]
plot(ItaUltra.spc,m.max=5)
plot(ItaUltra.spc,m.max=100,log="x")

## compute zm model and expeccted spectrum[#计算ZM模式和expeccted的频谱]
zm <- lnre("zm",ItaUltra.spc)
zm.spc <- lnre.spc(zm,N(ItaUltra.spc))

## compare observed and expected spectra (also[#比较观察值和期望值谱(也]
## in black and white to print on papers)[#在黑色和白色打印在纸张上)]
plot(ItaUltra.spc,zm.spc,legend=c("observed","expected"))
plot(ItaUltra.spc,zm.spc,legend=c("observed","expected"),bw=TRUE)
plot(ItaUltra.spc,zm.spc,legend=c("observed","expected"),log="x")
plot(ItaUltra.spc,zm.spc,legend=c("observed","expected"),log="x",bw=TRUE)

## re-generate expected spectrum with variances[#重新产生预期的不同与差异]
zm.spc <- lnre.spc(zm,N(ItaUltra.spc),variances=TRUE)

## now 95% ci is shown in log plot[#现在95%CI数图所示]
plot(zm.spc,log="x")

## different title and labels[#不同的标题和标签]
plot(zm.spc,log="x",main="Expected Spectrum with Confidence Interval",xlab="spectrum elements",ylab="expected type counts")


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 01:17 , Processed in 0.025057 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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