Learn R Programming

pluralize (version 0.2.0)

add_singular_rule: Add a custom rule for making a word singular

Description

Add a custom rule for making a word singular

Usage

add_singular_rule(plural_word, singular_word)

Arguments

plural_word

plural form of a word

singular_word

desired singular form of a word

Value

nothing (function produces a side effect of modifying in-memory internal package environment)

Examples

Run this code
# NOT RUN {
add_singular_rule("singles", "singular")
singularize('singles')
pluralize("irregular")
pluralize(c("woman", "man", "child", "tooth", "foot", "person", "leaf"))
singularize(c("woman", "man", "child", "tooth", "foot", "person", "leaf"))
# }

Run the code above in your browser using DataLab