Skip to contents

This function renames variables from d according to the columns in d.enframed, which should be in enframed format (two columns named name and value, see tibble::enframe() for details). It will rename from according to d.enframed$name, and to according to d.enframed$value

NOTE: This function may merit deprecation, because dplyr::rename_with(), coupled with lookup(), deals quite well with this use-case (and is more general).

d.enframed = tibble::enframe(c(a="New A", b="New B"))

Usage

rename_enframed(d, d.enframed)

Arguments

d

The tibble whose columns we want to rename.

d.enframed

The enframed tibble with the old and new names.

Value

A tibble that is identical to d but with renamed columns.