Learn R Programming

textclean (version 0.9.3)

make_plural: Make Plural (or Verb to Singular) Versions of Words

Description

Add -s, -es, or -ies to words.

Usage

make_plural(x, keep.original = FALSE,
  irregular = lexicon::pos_df_irregular_nouns)

Arguments

x

A vector of words to make plural.

keep.original

logical. If TRUE the original words are kept in the return vector.

irregular

A data.frame of singular and plural conversions for irregular nouns. The first column should be singular and the second plural form of the irregular noun.

Value

Returns a vector of plural words.

Examples

Run this code
# NOT RUN {
x <- c('fox', 'sky', 'dog', 'church', 'fish', 'miss', 'match', 'deer', 'block')
make_plural(x)
# }

Run the code above in your browser using DataLab