pluralise: Number agreement with a vector

pluraliseR Documentation

Number agreement with a vector

Description

This function chooses the singular or plural form of a word based on the length of an associated vector, or an integer.

Usage

pluralise(singular, x = NULL, n = NULL, plural = NULL)

Arguments

singular

The singular form of the word.

x

A vector of any mode, whose length is used to choose the correct word form, unless n is specified.

n

An integer which is used to choose the correct word form (singular if n = 1, plural otherwise). Take priority over x if not NULL.

plural

The plural form of the word. If NULL, an 's' is simply appended to the singular form.

Value

Either singular or plural, as appropriate.

Author(s)

Jon Clayden

References

Please cite the following reference when using TractoR in your work:

J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. https://www.jstatsoft.org/v44/i08/.


tractor.base documentation built on Aug. 24, 2022, 5:06 p.m.