pixiedust
Table Footerbroom::glance
output for a model object and
structures it into a table suitable to be placed in the footer. By default,
the statistics are displayed in two column-pairings (see Details). This
function is not exported but is documented to maintain clarity of its
behavior. It is intended for use within dust
, but may be useful
elsewhere if used with caution.glance_foot(fit, col_pairs, total_cols, glance_stats = NULL, byrow = FALSE)
broom::glance
method.NULL
, the default, all of the available
statistics are retrieved. In addition to controlling which statistics are
printed, this also controls the ordFALSE
, that indicates if the
requested statistics are placed with priority to rows or columns. See Details.stat_name_x
and stat_value_x
, where x
is
the integer index of the column pair. The column-pairings are used to allow
the user to further customize the output, more-so than pasting the name and
value together would allow. With this design, statistics can be rounded
differently by applying sprinkles to the resulting table.
The total number of column-pairings must be less than or equal to half the
number of total columns. This constraint prevents making glance tables that
have more columns than the model table it accompanies.
When the total number of column-parings is strictly less than half the total
number of columns, "filler" columns are placed between the column pairings.
As much as possible, the filler columns are placed evenly between the
column pairings, but when the number of filler columns is unequal between
column-pairings, there will be more space placed on the left side. For example,
if a table has 7 columns and 3 column-pairings, the order of placement would be
column-pair-1, filler, column-pair-2, column-pair-3. Since there was only room
for one column of filler, it was placed in the left most fill position.
The byrow
arguments acts similarly to the byrow
argument in the
matrix
function, but defaults to FALSE
. If four statistics are
requested and byrow = FALSE
, the left column-pair will have statistics
one and two, while the right column-pair will have statistics three and four.
If byrow = TRUE
, however, the left column-pair will have statistics
one and three, while the right column-pair will have statistics two and four.