Reduce a soundcorrs
object to just those word pairs/triples/... which meet a certain condition.
# S3 method for soundcorrs
subset(x, condition, ...)
[soundcorrs] The dataset to be subsetted.
[logical] The condition the subsetted data must meet.
Unused; only for consistency with subset
.
[soundcorrs] A soundcorrs object containing the subsetted dataset.
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.
# 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