Description Usage Arguments Details Examples
View source: R/set_names_from_template.R
Safe header renaming from a template file
1 | set_names_from_template(x, path, use_column = new_name)
|
x |
a tbl() to rename |
path |
the path to save the template into |
use_column |
the column for the new names, expects a quasiquotation (dplyr style) |
Renames a tibble or a data.frame from a template file. The renaming is safe in the sense that if the template doesn't include a specific header, it remains unchanged. Templates can be created with 'make_header_template'.
1 2 3 4 5 | mtcars %>% make_header_template(path = "mtcar_headers.csv")
mtcars %>% set_names_from_template(path = "mtcar_headers.csv")
iris %>% make_header_template(path = "iris_headers.xlsx")
iris %>% set_names_from_template(path = "iris_headers.xlsx")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.