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

R语言 zipfR包 N-V-Vm()函数中文帮助文档(中英文对照)

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

                                        Access Methods for Observed Frequency Data (zipfR)
                                         观察到的频率数据访问方法(zipfR)

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

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

N, V and Vm are generic methods that can (and should) be used to access observed frequency data for objects of class tfl, spc, vgc and lnre.  The precise behaviour of the functions depends on the class of the object, but in general N returns the sample size, V the vocabulary size, and Vm one or more selected elements of the frequency spectrum.
N,V和Vm是通用的方法,可以(而且应该)被用于访问观察到的频率为的类tfl的对象数据,spc, vgc和lnre。的确切行为的功能依赖于类的对象,但在一般N返回样本大小,V的词汇量,和Vm一个或多个选定元素的频率频谱。


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



  N(obj, ...)
  V(obj, ...)
  Vm(obj, m, ...)




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

参数:obj
an object of class tfl (type frequency list), spc (frequency spectrum), vgc (vocabulary growth curve) or lnre (LNRE model)
类tfl(类型频率“列表中的对象),spc(频谱),vgc(词汇生长曲线)或lnre(LNRE模型)


参数:m
positive integer value determining the frequency class m to be returned (or a vector of such values).
正整数的值,确定频率类m返回(或等价值的向量)。


参数:...
additional arguments passed on to the method implementation (see respective manpages for details)
额外的参数传递给方法的实现(请参阅相关的联机帮助页)


Details

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

For tfl and vgc objects, the Vm method allows only a single value m to be specified.
对于tfl和vgc对象,Vm方法允许只有一个值m来指定。


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

For a frequency spectrum (class spc), N returns the sample size, V returns the vocabulary size, and Vm returns individual spectrum elements.  
对于频谱(类spc)N返回样本的大小,V返回的词汇量的大小,Vm返回个人频谱元素。

For a type frequency list (class tfl), N returns the sample size and V returns the vocabulary size corresponding to the list.  Vm returns a single spectrum element from the corresponding frequency spectrum, and may only be called with a single value m.
如果一个类型的频率表(类tfl)N返回样本大小和V返回到列表中对应的词汇量的大小。 Vm返回一个单一的光谱元素从相应的频谱,可能只能被称为一个单值m。

For a vocabulary growth curve (class vgc), N returns the vector of sample sizes and V the vector of vocabulary sizes. Vm may only be called with a single value m and returns the corresponding vector from the vgc object (if present).
对于词汇的生长曲线(类vgc)N返回向量的样本大小和V向量的词汇量。 “”Vm可能只被称为一个单值m和vgc对象(如果存在)返回对应的向量。

For a LNRE model (class lnre) estimated from an observed frequency spectrum, the methods N, V and Vm return information about this frequency spectrum.
(类对于LNRE模型lnre)估计从观察到的频率频谱,方法N,V和Vm返回信息有关此频谱。


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

For details on the implementations of these methods, see N.tfl, N.spc, N.vgc, etc. When applied to an LNRE model, the methods return information about the observed frequency spectrum from which the model was estimated, so the manpages for N.spc are relevant in this case.
这些方法的实现的详细信息,请参阅N.tfl,N.spc,N.vgc,等等。当应用到一个LNRE的模型,方法的返回信息所观察到的频谱从该模型据估计,这样的联机帮助页N.spc是在这种情况下,有关。

Expected vocabulary size and frequency spectrum for a sample of size N according to a LNRE model can be computed with the analogous methods EV and EVm.  The corresponding variances are obtained with the VV and VVm methods, which can also be applied to expected or interpolated frequency spectra and vocabulary growth curves.
词汇量的大小和频谱样本大小N根据一个LNRE模型可以计算出用类似的方法EV和EVm。相应的方差得到VV和VVm的方法,这也可以适用于预期的或内插的频谱和词汇的生长曲线。


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



## load Brown spc and tfl[负载布朗SPC和TFL]
data(Brown.spc)
data(Brown.tfl)

## you can extract N, V and Vm (for a specific m)[#你可以提取N,V和VM(一个具体的M)]
## from either structure[#无论从结构]
N(Brown.spc)
N(Brown.tfl)

V(Brown.spc)
V(Brown.tfl)

Vm(Brown.spc,1)
Vm(Brown.tfl,1)

## you can extract the same info also from a lnre model estimated[#你可以提取相同的信息也从lnre模型估计]
## from these data (NB: these are the observed quantities; for the[#从这些数据(注:这是所观察到的数量;]
## expected values predicted by the model use EV and EVm instead!)[#预期值预测模型所使用EV和EVM),而不是!]
model <- lnre("gigp",Brown.spc)
N(model)
V(model)
Vm(model,1)

## Baayen's P:[“#Baayen的P:]
Vm(Brown.spc,1)/N(Brown.spc)

## when input is a spectrum (and only then) you can specify a vector[#当输入频谱(也是唯一的话),你可以指定一个向量]
## of m's; e.g., to obtain class sizes of first 5 spectrum elements[#M的,例如,获得的第5光谱元素的类的大小]
## you can write:[#你可以这样写:]
Vm(Brown.spc,1:5)

## the Brown vgc[#布朗VGC]
data(Brown.emp.vgc)

## with a vgc as input, N, V and Vm return vectors of the respective[#与VGC作为输入,N,V和Vm的返回向量的各自的]
## values for each sample size listed in the vgc[#中列出的值用于每个样品大小对VGC]
Ns <- N(Brown.emp.vgc)
Vs <- V(Brown.emp.vgc)
V1s <- Vm(Brown.emp.vgc,1)

head(Ns)
head(Vs)
head(V1s)

## since the last sample size in Brown.emp.vgc[#自上次样本大小Brown.emp.vgc]
## corresponds to the full Brown, the last elements[#对应于完整的布朗,最后一个元素]
## of the Ns, Vs and V1s vectors are the same as[#的Ns,Vs和V1S向量是相同的]
## the quantities extracted from the spectrum and[#数量从频谱中提取,]
## tfl:[#TFL:]
Ns[length(Ns)]
Vs[length(Vs)]
V1s[length(V1s)]


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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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