Skip to contents

Classifies each column by the first matching column_roles pattern and emits the groups in role order, then all unmatched columns. Order within a group is preserved.

Usage

order_columns(data, roles)

Arguments

data

A data frame.

roles

Ordered named list of regex patterns (see polis_config()'s column_roles).

Value

The data frame with reordered columns.