print_spc: Printing Frequency Spectra (zipfR)

Description Usage Arguments Details Value See Also Examples

Description

Implementations of the print and summary methods for frequency spectrum objects (of class spc).

Usage

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

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

Arguments

x, object

an object of class spc, representing a frequency spectrum

all

if FALSE, only the first ten non-empty frequency classes will be shown (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.spc works similar to the standard print method for data frames, but provides additional information about N and V. Unless all is set to TRUE, only the first ten non-zero spectrum elements will be shown.

summary.spc gives a concise summary of the most important information about the frequency spectrum. In addition to N V, the first spectrum elements are shown. The summary will also indicate whether the spectrum is incomplete, an expected spectrum, or has variances (but does not show the variances).

Value

NULL

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

See Also

See the spc manpage for details on spc objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## load Brown verbs dataset
data(BrownVer.spc)

## look at summary and print BrownVer.spc
summary(BrownVer.spc)
print(BrownVer.spc)

## print all non-zero spectrum elements
print(BrownVer.spc,all=TRUE)

## estimate zm model and construct expected spectrum with
## variances
zm <- lnre("zm",BrownVer.spc)
zm.spc <- lnre.spc(zm,N(zm),variances=TRUE)

## summary and print for the expected spectrum
summary(zm.spc)
print(zm.spc)

zipfR documentation built on Jan. 8, 2021, 2:37 a.m.