cc_varlist | R Documentation |
Copy a list of strings to Clipboard in a nice format e.g. with quotes and a comma, so that it can be easily insterted into a script.
cc_varlist(var_list, is_formula = FALSE, separate_lines = TRUE)
var_list |
A character vector |
is_formula |
(optional) if FALSE (default) then returns each item in quotes. If TRUE then returns each item seperated by a '+' for use in a formula |
separate_lines |
(optional) if TRUE (default) then each item is output to a seperate line. If FALSE then it is output as a single line. |
A quick and simple way to get a character vector into a script in a useful format.
See also cc
for more general output
example_var_list = names(mtcars)
# Copy the list, and format as required
cc_varlist(example_var_list)
# ...Now paste into your script
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.