Learn R Programming

soundcorrs (version 0.4.0)

checkUnit: Check if the unit argument is correct.

Description

Makes sure the unit argument has one of the many available values.

Usage

checkUnit(unit)

Arguments

unit

[character] The string to check.

Value

[character] Either "o" or "w".

Details

Functions which produce contingency tables, coocc and summary, have an argument count which can take as many as eight different values which all point to just two unique behaviours. checkCount reduces this multitude to just the two meaningful values. It also throws an error if count is none of the eight possibilities.

See Also

checkCount

Examples

Run this code
# NOT RUN {
soundcorrs:::checkUnit ("occ")
soundcorrs:::checkUnit ("occurrence")
# }

Run the code above in your browser using DataLab