unclean_column_names: Revert the effect of 'clean_column_names()'

Description Usage Arguments See Also Examples

View source: R/unclean_column_names.R

Description

Revert the effect of clean_column_names()

Usage

1

Arguments

data

A data frame

unclean

A data frame, commonly a version of data before running janitor::clean_names(data).

See Also

janitor::clean_names(), clean_column_names().

Other functions to deal with unclean names: clean_column_names(), clean_quo(), quo_chr()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
library(dplyr)

dirty <- tibble(x.x = 1, y = 1)
names(dirty)

clean <- janitor::clean_names(dirty)
names(clean)

names(unclean_column_names(clean, dirty))

# Cases where data doesn't change because no name matches unclean names
# exactly -- after applying janitor::clean_names()

unclean <- tibble(y = 1)
data <- tibble(y.y = 1)
data %>% unclean_column_names(unclean)

unclean <- tibble(y.y = 1)
data <- tibble(y = 1)
data %>% unclean_column_names(unclean)

2DegreesInvesting/PACTA_analysis documentation built on April 8, 2021, 9:17 p.m.