service.singular_or_plural {kidney.epi} | R Documentation |
Form output message in singular or plural.
Description
Form output message in singular or plural.
Usage
service.singular_or_plural(x, singular, plural)
Arguments
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). |
Details
Provide different output for constructing messages in singular or plural.
Programming: Boris Bikbov boris@bikbov.ru.
Value
Character string. Returns a value for constructing messages in singular or plural form.
Examples
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"
[Package kidney.epi version 1.2.0 Index]