order_layout: Order table rows.

order_layoutR Documentation

Order table rows.

Description

order_layout Orders the rows of a layout object table body.

Usage

order_layout(
  object,
  match_by = object@variable_col,
  order_by = object@.row_order,
  drop = FALSE
)

Arguments

object

A layout object.

match_by

A character element specifying the column name in the object@body that is used for ordering.

order_by

A character vector with variable names appearing in the order that is to be applied to the object@body.

drop

If TRUE, variables absent from order_by are removed from the returned object@body.

Value

A layout object where the object@body has been reordered.

See Also

prepare for making a layout object and layout_html for printing a layout object to html.

Other table layout: add_colgroup(), add_cols(), add_rowgroup(), add_units(), firstrow_css(), layout_html(), order_by_vector(), prepare(), print_abbrev(), query_abbrev()

Examples

example_layout <- order_layout(example_layout,
        match_by = 'key',
        order_by = c("Sepal.Length", "Petal.Length"))

eeenilsson/layout documentation built on Sept. 26, 2022, 8:14 p.m.