powered by
Remove prefices from column names.
remove_prefix(data, prefices, sep = ".")
data frame
vector of prefices to be removed from column names
prefix separator
data frame with updated column names
# NOT RUN { x <- data.frame(main.temp = 1:10, sys.msg = "OK", cnt = 10:1) names(x) remove_prefix(x, c("main", "sys")) %>% names() # }
Run the code above in your browser using DataLab