Render continuous values for table output.
render_numeric.Rd
Called from cttab
by default to render continuous (i.e.
numeric
) values for displaying in the table.
Arguments
- x
A numeric vector.
- what
A character or vector what will be reported for numeric variables, default is median and min, max. See
num_stat
for the supported statistics. The provided name will be used as statistic names (printed in the table), and the values is the statistics that will be reported. If you want to have a fancy name, use a named vector with names as the statistics will be printed and values are the statistics. For example,c("Geo. Mean (Geo. CV%)" = "GMean (GCV)", "Median [IQR]" = "Median [Q1, Q3]")
. In the latter case, the user visible statistics will be called"Median [IQR]"
and this is the name printed. But the underlying summarised statistics are median, Q1 and Q3. Separate statistics with comma or a space or any non-letters.- ...
Further arguments, passed to
num_stat
.
Value
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.
Details
This function was used by link{cttab}
to render numeric variables.
It essentially uses the values returned by num_stat
and
put values to a vector.