- df
(data.frame
or listing_df
)
the data.frame
to be converted to a listing or
listing_df
to be modified.
- key_cols
(character
)
vector of names of columns which should be treated as key columns
when rendering the listing. Key columns allow you to group repeat occurrences.
- disp_cols
(character
or NULL
)
vector of names of non-key columns which should be
displayed when the listing is rendered. Defaults to all columns of df
not named in key_cols
or
non_disp_cols
.
- non_disp_cols
(character
or NULL
)
vector of names of non-key columns to be excluded as display
columns. All other non-key columns are treated as display columns. Ignored if disp_cols
is non-NULL
.
- sort_cols
(character
or NULL
)
vector of names of columns (in order) which should be used to sort the
listing. Defaults to key_cols
. If NULL
, no sorting will be performed.
- unique_rows
(flag
)
whether only unique rows should be included in the listing. Defaults to FALSE
.
- default_formatting
(list
)
a named list of default column format configurations to apply when rendering
the listing. Each name-value pair consists of a name corresponding to a data class (or "numeric" for all
unspecified numeric classes) and a value of type fmt_config
with the format configuration that should be
implemented for columns of that class. If named element "all" is included in the list, this configuration will be
used for all data classes not specified. Objects of type fmt_config
can take 3 arguments: format
, na_str
,
and align
.
- col_formatting
(list
)
a named list of custom column formatting configurations to apply to specific
columns when rendering the listing. Each name-value pair consists of a name corresponding to a column name and a
value of type fmt_config
with the formatting configuration that should be implemented for that column. Objects
of type fmt_config
can take 3 arguments: format
, na_str
, and align
. Defaults to NULL
.
- align_colnames
(flag
)
whether the column titles should have the same alignment as their columns. All
titles default to "center"
alignment if FALSE
(default). This can be changed with align_colnames()
.
- add_trailing_sep
(character
or numeric
or NULL
)
If it is assigned to one or more column names,
a trailing separator will be added between groups with identical values for that column. Numeric option allows
the user to specify in which rows it can be added. Defaults to NULL
.
- trailing_sep
(character(1)
)
The separator to be added between groups. The character will be repeated to
fill the row.
- main_title
(string
or NULL
)
the main title for the listing, or NULL
(the default).
- subtitles
(character
or NULL
)
a vector of subtitles for the listing, or NULL
(the default).
- main_footer
(character
or NULL
)
a vector of main footer lines for the listing, or NULL
(the default).
- prov_footer
(character
or NULL
)
a vector of provenance footer lines for the listing, or NULL
(the default). Each string element is placed on a new line.
- split_into_pages_by_var
(character
or NULL
)
the name of a variable for on the listing should be split
into pages, with each page corresponding to one unique value/level of the variable. See
split_into_pages_by_var()
for more details.
- spanning_col_labels
(data.frame
)
A data.frame with the columns
span_level
, label
, start
, and span
defining 0 or more levels of
addition spanning (ie grouping) of columns. Defaults to no additional spanning labels.
- value
(string
)
new value.
- vec
(string
)
name of a column vector from a listing_df
object to be annotated as a key column.
- new
(character
)
vector of names of columns to be added to
the set of display columns.
- name
(string
)
name of the existing or new column to be
displayed when the listing is rendered.
- fun
(function
or NULL
)
a function which accepts df
and
returns the vector for a new column, which is added to df
as
name
, or NULL
if marking an existing column as a listing column.
- format
(string
or function
)
a format label (string) or formatter function.
- na_str
(string
)
string that should be displayed in place of missing values.
- align
(string
)
alignment values should be rendered with.