render.default | R Documentation |
Called from table1
by default to render values for
displaying in the table. This function forwards the call to separate
functions for rendering continuous, categorical and missing values.
The idea is that each of these functions can be overridden to customize
the table output.
render.default( x, name, missing = any(is.na(x)), transpose = F, render.empty = "NA", render.continuous = render.continuous.default, render.categorical = render.categorical.default, render.missing = render.missing.default, ... )
x |
A vector or numeric, factor, character or logical values. |
name |
Name of the variable to be rendered (ignored). |
missing |
Should missing values be included? |
transpose |
Logical indicating whether on not the table is transposed. |
render.empty |
A |
render.continuous |
A function to render continuous (i.e.
|
render.categorical |
A function to render categorical (i.e.
|
render.missing |
A function to render missing (i.e. |
... |
Further arguments, passed to |
A character
vector. Each element is to be displayed in a
separate cell in the table. The names
of the vector are the
labels to use in the table. However, the first names should be empty as it
will be replaced by the name of the variable. Empty strings are allowed and
result in empty table cells.
x <- exp(rnorm(100, 1, 1)) render.default(x) render.default(x, TRUE) y <- factor(sample(0:1, 99, replace=TRUE), labels=c("Female", "Male")) y[1:10] <- NA render.default(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.