Learn R Programming

soundcorrs (version 0.1.1)

summary.soundcorrs: Generate a segment-to-segment contingency table for two languages.

Description

Produce a contingency table detailing all segment-to-segment correspondences in a dataset.

Usage

# S3 method for soundcorrs
summary(object, count = "a", unit = "w", direction = 1, ...)

Arguments

object

[soundcorrs] The dataset from which to draw frequencies. Only datasets with two languages are supported.

count

[character] Report the absolute number of times or words, or relative to how many times or in how many words the given segments co-occur in L1 or L2. Accepted values are "a(bs(olute))" and "r(el(ative))". Defaults to "a".

unit

[character] Count how many times a correspondence occurs or in how many words it occurs. Accepted values are "o(cc(ur(ence(s))))" and "w(or(d(s)))". Defaults to "w".

direction

[integer] If 1, correspondences are in the order Language1 > Language2 ("x yields y"). If 2, the order is Language2 < Language1 ("y originates from x"). Defaults to 1.

...

Unused; only for consistency with print.

Value

[table] The contingency table.

Examples

Run this code
# NOT RUN {
dataset <- sampleSoundCorrsData.abc
summary (dataset)
round (summary(dataset,count="r"), digits=3)
summary (dataset, unit="o")
summary (dataset, direction=2)
# }

Run the code above in your browser using DataLab