Description Usage Arguments Value Examples
View source: R/internal_functions.R
I use this internally for turning a vector of package names into a string.
1 | collapse_vec(..., wrap = "'", collapse = ", ", unique = TRUE)
|
... |
(...) Vectors that will be concatenated and coerced to Character. |
wrap |
(Character) Placed at the left and right sides of each vector element. |
collapse |
(Character) Placed between each element of the original vector(s). |
unique |
(Logical) If |
A string.
1 2 3 4 5 | ## Not run:
collapse_vec(month.abb)
#> [1] "'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'"
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.