This function prints the code to create a given vector.
vector_code(a, line_breaks = FALSE)
# 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))
#> c('one', 'two', 'three', 'four')
# Print code with new lines in between each string:
vector_code(unique(strings), line_breaks = TRUE)
#> c(
#> 'one',
#> 'two',
#> 'three',
#> 'four'
#> )