Punits {rms} | R Documentation |
Prepare units for Printing and Plotting
Description
Takes a character variable containing units of measurement for a variable.
If it has zero length, a ""
string is return. Otherwise, any trailing "s"
is
removed if the string is longer than one character, and depending on the arguments,
the string is changed to lower case, "s"
is added, and the first character is
changed to upper case.
Usage
Punits(u, lower = TRUE, adds = TRUE, upfirst = FALSE, default = "")
Arguments
u |
a single string containing units of measurement |
lower |
if |
adds |
if |
upfirst |
if |
default |
default units if |
Value
a single character string
See Also
Examples
## Not run:
Punits('Years')
## End(Not run)
[Package rms version 8.0-0 Index]