powered by
I use this internally for turning a vector of package names into a string.
collapse_vec(..., wrap = "'", collapse = ", ", unique = TRUE)
(...) Vectors that will be concatenated and coerced to Character.
(Character) Placed at the left and right sides of each vector element.
(Character) Placed between each element of the original vector(s).
(Logical) If TRUE, duplicate entries in ... will be removed.
TRUE
...
A string.
# NOT RUN { collapse_vec(month.abb) #> [1] "'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'" # } # NOT RUN { # }
Run the code above in your browser using DataLab