remove_prefix: Remove prefices from column names.

Description Usage Arguments Value Examples

View source: R/tidy_up-remove_prefix.R

Description

Remove prefices from column names.

Usage

1
remove_prefix(data, prefices, sep = ".")

Arguments

data

data frame

prefices

vector of prefices to be removed from column names

sep

prefix separator

Value

data frame with updated column names

Examples

1
2
3
x <- data.frame(main.temp = 1:10, sys.msg = "OK", cnt = 10:1)
names(x)
remove_prefix(x, c("main", "sys")) %>% names()

owmr documentation built on Jan. 11, 2020, 5:08 p.m.