Learn R Programming

zipfR (version 0.6-70)

N-V-Vm.vgc: Access Methods for Vocabulary Growth Curves (zipfR)

Description

Return the vector of sample sizes (N.vgc), vocabulary sizes (V.vgc) or class sizes (Vm.vgc) from the vocabulary growth curve (VGC) represented by a vgc object. For an expected or interpolated VGC with variance information, VV.vgc returns the vector of variances of the vocabulary size and VVm.vgc the variance vectors for individual spectrum elements.

Note that these functions are not user-visible. They can be called implicitly through the generic methods N, V, Vm, VV and VVm, applied to an object of type vgc.

Usage

# S3 method for vgc
N(obj, ...)

# S3 method for vgc V(obj, ...)

# S3 method for vgc Vm(obj, m, ...)

# S3 method for vgc VV(obj, N=NA, ...)

# S3 method for vgc VVm(obj, m, N=NA, ...)

Arguments

obj

an object of class vgc, representing an observed, interpolated or expected VGC

m

positive integer value determining the frequency class \(m\) for which the vector of class sizes is returned

N

not applicable (this argument of the generic method is not used by the implementation for vgc objects and must not be specified)

...

additional arguments passed on from generic method will be ignored

Value

N.vgc returns the vector of sample sizes \(N\), V.vgc returns the corresponding vocabulary sizes \(V(N)\) (or expected vocabulary sizes \(E[V(N)]\)), and Vm.vgc returns the vector of class sizes \(V_m(N)\) (or the expected spectrum elements \(E[V_m(N)]\)) for the selected frequency class \(m\).

For an expected or interpolated VGC with variance information, VV.vgc returns the vector of variances \(\mathop{Var}[V(N)]\) of the expected vocabulary size, and VVm.vgc returns vector of variances \(\mathop{Var}[V_m(N)]\) for the selected frequency class \(m\).

Except for N.vgc, the vector returned will be labelled with corresponding sample sizes.

Details

VV.vgc a VVm.vgc will fail if the object obj does not include variance data. Vm.vgc and VVm.vgc will fail if the selected frequency class is not included in the VGC data.

See Also

N, V, Vm, VV, VVm for the generic methods and links to other implementations

vgc for details on vocabulary growth curve objects and links to other relevant functions