service.singular_or_plural {kidney.epi} | R Documentation |
Form output message in singular or plural.
service.singular_or_plural(x, singular, plural)
x |
Numeric. The value to be checked (usualy a counter of some variable). |
singular |
Character string. The value to be returned in case of singular form (usualy a string, but could be any type). |
plural |
Character string. The value to be returned in case of plural form (usualy a string, but could be any type). |
Provide different output for constructing messages in singular or plural.
Programming: Boris Bikbov boris@bikbov.ru.
Character string. Returns a value for constructing messages in singular or plural form.
service.singular_or_plural(1, "This value was", "These values were") # "This value was"
service.singular_or_plural(99, "This value was", "These values were") # "These values were"