cat_names | R Documentation |
Returns unquoted column names for scripting
cat_names(df, pattern = NULL, index = NULL, sep = "\n")
df |
a dataframe or tibble |
pattern |
an optional regex for selection of column names |
index |
an optional vector of column indices for selection |
sep |
seperator for column names, suggestions include ", ", " + ", and combinations with newline. |
An unquoted string of column names
df <- data.frame(A = 0L, B= 0L, C = 0L, test1 = 0L, test2 = 0L) cat_names(df) cat_names(df, sep = ',') cat_names(df, index =2:3, sep = '+') cat_names(df, pattern = "test", sep = '+')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.