data_addprefix | R Documentation |
Add a prefix or suffix to column names
data_addprefix(
data,
pattern,
select = NULL,
exclude = NULL,
ignore_case = FALSE,
regex = FALSE,
verbose = TRUE,
...
)
data_addsuffix(
data,
pattern,
select = NULL,
exclude = NULL,
ignore_case = FALSE,
regex = FALSE,
verbose = TRUE,
...
)
data |
A data frame. |
pattern |
A character string, which will be added as prefix or suffix to the column names. |
select |
Variables that will be included when performing the required tasks. Can be either
If |
exclude |
See |
ignore_case |
Logical, if |
regex |
Logical, if |
verbose |
Toggle warnings. |
... |
Other arguments passed to or from other functions. |
data_rename()
for more fine-grained column renaming.
# Add prefix / suffix to all columns
head(data_addprefix(iris, "NEW_"))
head(data_addsuffix(iris, "_OLD"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.