Printing Vocabulary Growth Curves (zipfR)

Share:

Description

Implementations of the print and summary methods for vocabulary growth curve objects (of class vgc).

Usage

1
2
3
4
5
  ## S3 method for class 'vgc'
print(x, all=FALSE, ...)

  ## S3 method for class 'vgc'
summary(object, ...)

Arguments

x, object

an object of class vgc, representing a vocabulary growth curve

all

if FALSE, vocabulary growth data are shown for at most 25 sample sizes (default)

...

other arguments passed on from generic method will be ignored

Details

NB: implementation details and format of the summary are subject to change in future releases

print.vgc calls the standard print method for data frames internally, but reduces the data set randomly to show at most 25 sample sizes (unless all=TRUE).

summary.vgc gives a concise summary of the available vocabulary growth data in the vgc object, including the number and range of sample sizes, whether spectrum elements are included, and whether variances are included.

Value

NULL

Unlike other implementations of the summary method, summary.vgc only prints a summary on screen and does not return a special "summary" object.

See Also

See the vgc manpage for details on vgc objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## load Brown "informative" prose empirical vgc
data(BrownInform.emp.vgc)

## summary, print (random subset) and print all
summary(BrownInform.emp.vgc)
print(BrownInform.emp.vgc)
print(BrownInform.emp.vgc,all=TRUE)

## load Brown informative prose spectrum
## and get estimate a fzm model
data(BrownInform.spc)
fzm <- lnre("fzm",BrownInform.spc,exact=FALSE)

## obtain expected vgc up to 2M tokens
## with spectrum elements up to V_3
## and variances
fzm.vgc <- lnre.vgc(fzm,(1:100)*2e+4,m.max=3,variances=TRUE)

## summary and print
summary(fzm.vgc)
print(fzm.vgc)
print(fzm.vgc,all=TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.