clean_names | R Documentation |
Tidies up names of a data frame within certain rules
clean_names(df, convert = TRUE, verbose = options()$verbose)
clean_string(x)
df |
a data frame |
convert |
a logical to indicate if you want to modify |
verbose |
logical to print information on changes to the global environment or external files. Defaults to options()$verbose. |
x |
a character string to be cleaned. |
df
is modified to have variable names that are
lower case
dots, slashes,+ replaced with _
no leading or trailing whitespace
so a variable called "Nasty/Var+Name " gets turned into "nasty_var_name" .
clean_names
returns either a vector of cleaned names is return
directly, or the input object is modified in the parent envirnoment
(the default) and an invisible copy of the modified input returned
clean_string
returns an individual vector with the contents
cleaned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.