Formats data for pretty printing: methods for "lcens," "mcens," and "qw" data.
Usage
# S3 method for lcens
format(x, digits = NULL, ...)
# S3 method for mcens
format(x, digits = NULL, ...)
# S3 method for qw
format(x, round = TRUE, units = FALSE, style = "asis",
...)
Arguments
x
the censored data object to format.
digits
how many significant digits are to be used for numbers?
…
further arguments passed to or from other methods.
round
round the data before formating? Can also be a numeric vector of
length 2 containing the maximum number of significant digits and the maximum
number of decimal digits.
units
logical, if TRUE then include the units of the data.
style
the style for objects of class "qw." See Details.
Value
A character representations of the elements of x.
Details
The argument style must be one of "asis," which tries to format
the data to best show the values; "simple," which is like "asis" except that interval
censored data are the midrange values preceded by "I"; or "interpreted," which shows
the values as they would be used in analysis and round is ignored.
Only the first letter is required.