Learn R Programming

pluralize (version 0.2.0)

pluralize: Pluralize a word

Description

If the built-in rules are not sufficient, use add_plural_rule() to customize the behavior.

Usage

pluralize(x, n = 2, prepend = FALSE)

Arguments

x

character vector of words to make plural

n

amount of plural (some plurals change by amount and this also impacts the prepend functionality)

prepend

should we prepend the value of n to the output? Default: FALSE

Value

character vector of modified pluralized words

Examples

Run this code
# NOT RUN {
pluralize('test')
pluralize('test', 5)
pluralize('test', 5, TRUE)
pluralize('regex')
# }

Run the code above in your browser using DataLab