Create tabular output from an R data frame
stable(data, ...)
# S3 method for class 'data.frame'
stable(
data,
align = cols_left(),
panel = NULL,
span = NULL,
notes = NULL,
sumrows = NULL,
units = NULL,
drop = NULL,
sizes = tab_size(),
caption = NULL,
control = st_control(),
escape_fun = tab_escape,
inspect = FALSE,
...
)
# S3 method for class 'pmtable'
stable(data, ...)
# S3 method for class 'stable'
stable(data, ...)
# S3 method for class 'stobject'
stable(data, ...)
a data.frame to convert to tabular table; the user should filter
or subset so that data
contains exactly the rows (and columns) to be
processed; pmtables will not add or remove rows prior to processing data
;
see also st_new()
passed to other functions: tab_hlines()
, tab_spanners()
,
tab_notes()
, tab_cols()
, tab_clear_reps()
and make_tabular()
an alignment object created by cols_align()
, cols_left()
,
cols_center()
, or cols_right()
; see also st_align()
character column name to use to section the table; sections will
be created from unique values of data[[panel]]
; see also st_panel()
a list of objects created with colgroup()
; ; see also st_span()
a character vector of notes to include at the foot of the table;
use r_file
and output_file
for source code and output file annotations;
see tab_notes()
for arguments to pass in order to configure the way notes
appear in the output; see also st_notes()
an object created with sumrow()
; identifies summary rows
and adds styling; see also st_sumrow()
a named list with unit information; names should correspond to columns in the data frame
columns to remove prior to rendering the table
an object returned from tab_size()
a caption for the table; this could be raw caption text or
a caption object created with as.caption()
not used at the moment
a function passed to prime_fun
that will sanitize column
data
if TRUE
, extra information is attached to the output
as an attribute called stable_data
; see get_stable_data()