vector_code | R Documentation |
This function prints the code to create a given vector.
vector_code(a, line_breaks = FALSE)
a |
A vector of elements for which the printed code will create. |
line_breaks |
Set to TRUE to print a new line in between each string |
# Create a set of strings:
strings <- c('one', 'two', 'one', 'three', 'two', 'four')
# Print code to create the set of all unique string values:
vector_code(unique(strings))
# Print code with new lines in between each string:
vector_code(unique(strings), line_breaks = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.