format.lcens | R Documentation |
Formats data for pretty printing: methods for "lcens," "mcens," and "qw" data.
## S3 method for class 'lcens' format(x, digits = NULL, ...) ## S3 method for class 'mcens' format(x, digits = NULL, ...) ## S3 method for class 'qw' format(x, round = TRUE, units = FALSE, style = "asis", ...)
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 |
style |
the style for objects of class "qw." See 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.
A character representations of the elements of x
.
For style
set to "asis," it is often useful to set round
to a
single value so that the interval data are not rounded to the same value.
format(as.lcens(1:3, 1)) format(as.mcens(1:3, 1:3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.