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

Description Usage Arguments Details Value Examples

Description

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

Usage

1
2
## S3 method for class '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.

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.

Value

[soundcorrs] A soundcorrs object containing the subsetted dataset.

Examples

1
2
3
4
5
6
7
# 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

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