View source: R/helpful_functions.R
rename_element | R Documentation |
The function will rename elements in a specific column by vectors "old_name" and "new_name". Simply give the function a vector with old names that should be renamed by a vector with new names. _Be carefull that elements in new_name have the rigth position_ (e.g. the second element in "old_name" will be replaced by the second element in "new_name").
rename_element(df, colname, old_name, new_name)
df |
data.frame; input data.frame |
colname |
character; name of the column storing the elements to be renamed |
old_name |
vector; elements that should be renamed in column specified by 'colname' |
new_name |
vector; new names of the elements specified by "old_name" |
data.frame; with renamed elements in "colname"
rename_element(root_output,
colname = "Label",
old_name = c("Col_0;28", "Col_0;20"), new_name = c("Col0_28", "Col0_20")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.