50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

soundcorrs (version 0.4.0)

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.

Details

Once a data frame is enclosed in a soundcorrs object, it is recommended that it not be manually altered in any way. subset.soundcorrs provides a safe way of subsetting it.

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 <- loadSampleDataset ("data-capitals")
subset (dataset, OFFICIAL.LANGUAGE=="German")
subset (dataset, grepl("German",OFFICIAL.LANGUAGE))
subset (dataset, findExamples(dataset, "\u00E4", "e", "")$which)  # a-diaeresis
# }

Run the code above in your browser using DataLab