add_suffix | R Documentation |
When creating new variables or modifying the data set, we often add a suffix added to distinguish the new name from the original one. However, if the same action is performed twice (for example, filtering a data set), the suffix is duplicated (data.filtered.filtered). This function averts this by adding the suffix if it doesn't exist, and otherwise appending a counter (data.filtered2).
add_suffix(name, suffix)
name |
a character vector containing (original) names |
suffix |
the suffix to add, a length-one character vector |
character vector of names with suffix appended
add_suffix("data", "filtered")
add_suffix(c("data.filtered", "data.filtered.reshaped"), "filtered")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.