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

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

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

                                        Vocabulary Growth Curves (zipfR)
                                         词汇生长曲线(zipfR)

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

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

In the zipfR library, vgc objects are used to represent a vocabulary growth curve (VGC).  This can be an observed VGC from an incremental set of sample (such as a corpus), a randomized VGC obtained by binomial interpolation, or the expected VGC according to a LNRE model.
zipfR库,vgc对象被用来代表一个词汇生长曲线(VGC)。这可以是一个观察到的VGC从增量组的样品(如语料库),随机的VGC二项式插值,或预期的VGC根据一个LNRE模型通过以下方式获得。

With the vgc constructor function, an object can be initialized directly from the specified data vectors.  It is more common to read an observed VGC from a disk file with read.vgc, generate a randomized VGC with vgc.interp or compute an expected VGC with lnre.vgc, though.
vgc构造函数,可以直接初始化一个对象从指定的数据向量。从磁盘文件读取所观察到的VGC read.vgc,产生一个随机VGC vgc.interp或计算的预期VGC lnre.vgc,虽然这是比较常见的。

vgc objects should always be treated as read-only.
vgc对象应始终被视为只读。


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



  vgc(N, V, Vm=NULL, VV=NULL, VVm=NULL, expected=FALSE, check=TRUE)




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

参数:N
integer vector of sample sizes N for which vocabulary growth data is available
整数向量的样本大小N词汇增长的数据是可用的


参数:V
vector of corresponding vocabulary sizes V(N), or expected vocabulary sizes E[V(N)] for an interpolated or expected VGC.
矢量相应的词汇量V(N),或预期的词汇量E[V(N)]插或预期VGC。


参数:Vm
optional list of growth vectors for hapaxes V_1(N), dis legomena V_2(N), etc.  Up to 9 growth vectors are accepted (i.e.\ V_m(N) for m ≤ 9).  For an interpolated or expected VGC, the vectors represent expected class sizes E[V_m(N)].
可选列表,增长向量hapaxes V_1(N),显示legomena V_2(N)“等多达9个增长向量被接受(即\V_m(N)m ≤ 9)。对于内插或预期VGC代表预计,矢量班级规模E[V_m(N)]。


参数:VV
optional vector of variances Var[V(N)] for an interpolated or expected VGC
可选的向量差异Var[V(N)]插或预期VGC


参数:VVm
optional list of variance vectors Var[V_m(N)] for an expected VGC.  If present, these vectors must be defined for exactly the same frequency classes m as the vectors in Vm.
可选列表的变化向量Var[V_m(N)]预期的VGC。如果有的话,这些向量必须被定义为完全一样的频度等级m中的向量Vm。


参数:expected
if TRUE, the object represents an interpolated or expected VGC (for informational purposes only)
如果TRUE,该对象表示的内插或预期VGC(仅供参考)


参数:check
by default, various sanity checks are performed on the data supplied to the spc constructor.  Specify check=FALSE to skip these sanity test, e.g. when automatically processing data from external programs that may be numerically unstable.
默认情况下,各种完整性检查的数据提供给spc构造。指定check=FALSE跳过这些完备性测试,例如从外部程序可能在数值上不稳定时,自动数据处理。


Details

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

If variances (VV or VVm) are specified for an expected VGC, all relevant vectors must be given.  In other words, VV always has to be present in this case, and VVm has to be present whenever Vm is specified, and must contain vectors for exactly the same frequency classes.
如果差异(VV或VVm)被指定为预期的VGC,所有相关的向量,必须给予。换言之,VV总是有在这种情况下,可以存在,和VVm是本每当Vm指定,必须包含完全相同的频度等级的向量。

V and VVm are integer vectors for an observed VGC, but will usually be fractional for an interpolated or expected VGC.
V和VVm向量的观察VGC是整数,但通常会是分数内插或预期VGC。

A vgc object is a data frame with the following variables:
Avgc对象是一个数据框以下因素:




N sample size N
N样本量N




V corresponding vocabulary size (either observed vocabulary size V(N) or expected vocabulary size
V相应的词汇量的大小(无论是观察到的词汇量的大小V(N)或预期的词汇量的大小




V1 ... V9 optional: observed or expected spectrum elements (V_m(N) or E[V_m(N)]).  Not all of these variables have to be present, but there must not be any
V1... V9可选:观察到的或预期的的光谱元素(V_m(N)或E[V_m(N)])。并非所有这些变量都存在,但不能有任何




VV optional: variance of expected vocabulary size,
VV可选:方差的预期词汇量的大小,




VV1 ... VV9 optional: variances of expected spectrum elements, Var[V_m(N)].  If variances are present, they must be available for exactly the same
VV1... VV9可选:差异预期的光谱元素,Var[V_m(N)]。如果存在差异,他们必须是一模一样的

The following attributes are used to store additional information about the vocabulary growth curve:
下面的属性用于存储其他信息的词汇增长曲线:




m.max if non-zero, the VGC includes spectrum elements V_m(N) for m up to m.max.  For m.max=0,
m.max如果不为零,VGC包括频谱元素V_m(N)m到m.max的。对于m.max=0,




expected if TRUE, the object represents an interpolated or expected VGC, with expected vocabulary size and spectrum elements.  Otherwise, the object represents an observed
expected如果TRUE,该对象表示内插或预期VGC,与预期的词汇量和光谱元素。否则,该对象表示的观察




hasVariances indicates whether or not the VV variable is present (as well as VV1, VV2, etc., if
hasVariances表示是否VV变量(以及VV1,VV2,等等,如果,


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

An object of class vgc representing the specified vocabulary growth curve.  This object should be treated as read-only (although such behaviour cannot be enforced in R).
对象的类vgc代表指定的词汇生长曲线。这个对象应该被视为只读(虽然这种行为不能被强制执行,在R)。


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

read.vgc, write.vgc, plot.vgc, vgc.interp, lnre.vgc
read.vgc,write.vgc,plot.vgc,vgc.interp,lnre.vgc

Generic methods supported by vgc objects are print, summary, N, V, Vm, VV, and VVm.
支持的vgc对象的通用方法是print,summary,N,V,Vm,VV和VVm。

Implementation details and non-standard arguments for these methods can be found on the manpages print.vgc, summary.vgc, N.vgc, V.vgc, etc.
这些方法的执行细节及非标参数上可以找到的手册页print.vgc,summary.vgc,N.vgc,V.vgc,等


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



## load Dickens' work empirical vgc and take a look at it[#加载狄更斯的工作经验VGC来看看它]

data(Dickens.emp.vgc)
summary(Dickens.emp.vgc)
print(Dickens.emp.vgc)

plot(Dickens.emp.vgc,add.m=1)

## vectors of sample sizes in the vgc, and the[向量对VGC的样本量,]
## corresponding V and V_1 vectors[#对应的V和V_1向量]
Ns <- N(Dickens.emp.vgc)
Vs <- V(Dickens.emp.vgc)
Vm <- V(Dickens.emp.vgc,1)

## binomially interpolated V and V_1 at the same sample sizes[#二项式插V和V_1在相同的采样大小]
## as the empirical curve[#为经验曲线]
data(Dickens.spc)
Dickens.bin.vgc <- vgc.interp(Dickens.spc,N(Dickens.emp.vgc),m.max=1)

## compare observed and interpolated[#比较观察和插值]
plot(Dickens.emp.vgc,Dickens.bin.vgc,add.m=1,legend=c("observed","interpolated"))


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

## compute zm model[#计算ZM模型]
zm <- lnre("zm",ItaUltra.spc)

## compute vgc up to about twice the sample size[#计算VGC大约两倍的样本大小]
## with variance of V[与方差的V#]
zm.vgc <- lnre.vgc(zm,(1:100)*70, variances=TRUE)

summary(zm.vgc)
print(zm.vgc)

## plot with confidence intervals derived from variance in[#图来自方差的置信区间]
## vgc (with larger datasets, ci will typically be almost[#VGC(大的数据集,词通常会几乎]
## invisible)[#隐形)]
plot(zm.vgc)

## for more examples of vgc usages, see manpages of lnre.vgc,[#更多的的VGC用途的例子,请参阅联机帮助页lnre.vgc,]
## plot.vgc, print.vgc  and vgc.interp[#plot.vgc,print.vgc和vgc.interp]



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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 02:36 , Processed in 0.025539 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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