rename: Rename columns

Description Usage Arguments

Description

Bulk rename a number of columns. Note that this overlaps significantly with dplyr's function of the same name, with the chief differences being handling of yaml metadata and slightly odd handling of polarity. We may just depend on dplyr later.

Usage

1
rename(data, table, reverse_direction = NULL, allow_missing = FALSE)

Arguments

data

A data.frame to modify

table

A table of from = to or to = from mappings

reverse_direction

Logical (or NULL) to indicate the direction of the mapping. If TRUE, then table is treated as a set of to = from mappings, while if FALSE it is treated as from = to mappings. If NULL the direction is determined automatically.

allow_missing

Allow columns to be missing in data (but present table). This is not compatible with reverse_direction = NULL.


Hackout3/cleanr documentation built on May 6, 2019, 9:48 p.m.