Learn R Programming

soundcorrs (version 0.1.1)

subset.soundcorrs: Return a subset of sound correspondences data which meets a condition.

Description

Reduce a soundcorrs object to just those word pairs/triples/... which meet a certain condition.

Usage

# S3 method for soundcorrs
subset(x, condition, ...)

Arguments

x

[soundcorrs] The dataset to be subsetted.

condition

[logical] The condition the subsetted data must meet.

...

Unused; only for consistency with subset.

Value

[soundcorrs] A soundcorrs object containing the subsetted dataset.

Examples

Run this code
# NOT RUN {
# In the examples below, non-ASCII characters had to be escaped for technical reasons.
# In actual usage, all soundcorrs functions accept characters from beyond ASCII.
dataset <- sampleSoundCorrsData.capitals
subset (dataset, OFFICIAL.LANGUAGE=="German")
subset (dataset, grepl("German",OFFICIAL.LANGUAGE))
subset (dataset, findPairs(dataset, "\u00E4", "e")$which)  # a-diaeresis
# }

Run the code above in your browser using DataLab