Description Usage Arguments Note Examples
A helper function to clean up column names.
1 2 |
data |
The data frame or tibble to tidy. |
remove |
A regular expression or vector of regular expressions to remove in all header names. For example, the argument c("aa","b") would delete ALL occurances of the characters "aa" and "b". |
rename |
A vector of the form c("old_name1", "new_name1", "old_name2", "new_name2"). In this case, "old_name1" or "old_name2" could be replaced with an integer indicating the column index in which the new name should be inserted. |
lowercase |
A boolean indicating whether the output names should be forced to lowercase. Defaults to TRUE. |
replace |
A vector of regular expressions and character string. The first element in the vector is replaced by the second, the third is replaced by the fourth, and so on. If a vector with an odd length is passed, the last element will be ignored will replace the first value with the second. In other words c("foo","bar") in the title would replace all occurances of "foo" with "bar" in the new menu. |
Order of Operations: 1) replace punctuation and spaces with underscores, 2) rename, 3) replace_all, 4) remove, 5) to lowercase. This could impact the results of the function.
1 | wiki_table("List_of_metro_systems") %>% wiki_names()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.