change_names: Change a vector or data frame names

Description Usage Arguments Examples

Description

This function changes your data frame column names or character vector elements according with a specified pattern. By default it fixes column names that have a "." used as words separator to "_".

Usage

1
change_names(x, from = ".", to = "_")

Arguments

x

A data frame or vector

from

Character to replace. Defaults to "."

to

Character to apply Defaults to "_"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x <- c("Example.1", "Example.2", "Example/3")
change_names(x)

df <- data_frame(
  "Example.1" = c(1, 2),
  "Example.2" = c(1, 2),
  "Example!3" = c(1, 2))

df %>%
  change_names()

konradsemsch/aider documentation built on May 22, 2019, 2:40 p.m.