Description Usage Arguments Value Examples
This is useful for when the user wants to use the columns in a presentation. Shiny, Power BI, and RMarkdown are use cases where we may want clean column names for the user to read.
1 |
object |
A data.frame, ggplot or character vector object. A data.frame will have transformed column names. A ggplot object will have transformed X and Y axes. A character vector will have clean character names. |
format |
A string. The desired target (default is "title") case with options including:
|
acronyms |
A Character. Default |
names_only |
A Logical. Default |
Returns a data.frame with clean names, a ggplot object with clean axes, or a vector of clean strings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# snake to title
.data %>%
snake_to()
# snake to sentence
.data %>%
snake_to(format = "sentence")
# snake to title, keep vector of transformed column names
.data %>%
snake_to(names_only = TRUE)
# snake to title, capitalize acronyms
acronyms <- c("pyr", "cyr")
.data %>%
snake_to(acronyms = acronyms)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.