df_add_affix | R Documentation |
Add a prefix to column names on data.frame or matrix or similar.
df_add_affix(data, prefix = "", suffix = "")
data |
(an object) An object whose colnames should be changed |
prefix |
(str) A prefix to add. |
suffix |
(str) A suffix to add. |
test_iris = iris[1:10, ] #small test dataset
df_add_affix(test_iris, prefix = "P_") #ad P_ prefix
df_add_affix(test_iris, suffix = "_S") #ad _S suffix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.