order_columns: Sort a data frame by column name

Description Usage Arguments Value Examples

View source: R/order_columns.R

Description

Sort a data frame by column name

Usage

1
order_columns(df, lead_vars)

Arguments

df

A data frame

lead_vars

A vector of variable names. Variables are put at the beginning and not included in the sorting operation.

Value

A data frame, sorted by column names and prefixed by lead_vars.

Examples

1
order_columns(hospital, c("patient_id", "hospital_id"))

antchau/glider documentation built on Dec. 1, 2020, 9:23 p.m.