tabAbs2Rel: Convert a table from absolute to relative values.

Description Usage Arguments Details Value Examples

Description

Cross-tabulating sound correspondences with themselves may be misleading if the values are absolute, as it may well be that some segments simply do co-occur frequently, while others only rarely. The conversion is done in blocks: rows with the same prefix vs cols with the same prefix (if column = NULL) or vs all columns (if column is a string).

Usage

1
tabAbs2Rel(tab, column)

Arguments

tab

[table] The contingency table with sound correspondences.

column

[character] Do columns contain the same data as rows (NULL) or some other data (a string)?

Details

Functions that produce contingency tables, coocc and summary, return a result in absolute numbers, but sometimes the relative perspective may be more useful. This function converts from absolute to relative, but it does so in blocks where each block is an intersection of all the columns and the all rows whose names begin with the same prefix. 'Prefix' in this case is whatever comes before an underscore ("_"), because coocc and others use underscore to connect names of columns and rows.

Value

[table] The converted table.

Examples

1
2
dataset <- loadSampleDataset ("data-abc")
soundcorrs:::tabAbs2Rel (coocc(dataset,unit="o"), NULL)

soundcorrs documentation built on Nov. 16, 2020, 5:09 p.m.