Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

print_spc

Printing Frequency Spectra (zipfR)


Description

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

Usage

## 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

## 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

Statistical Models for Word Frequency Distributions

v0.6-70
GPL-3
Authors
Stefan Evert <stefan.evert@fau.de>, Marco Baroni <marco.baroni@unitn.it>
Initial release
2020-10-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.