join_words | R Documentation |
If words
is of length 2, the first word and second word are joined by the
and
string; if and
is blank, sep
is used. When the length is greater
than 2, sep
is used to separate all words, and the and
string is
prepended to the last word.
join_words(
words,
sep = ", ",
and = " and ",
before = "",
after = before,
oxford_comma = TRUE
)
words |
A character vector. |
sep |
Separator to be inserted between words. |
and |
Character string to be prepended to the last word. |
before , after |
A character string to be added before/after each word. |
oxford_comma |
Whether to insert the separator between the last two elements in the list. |
A character string marked by raw_string()
.
join_words("a")
join_words(c("a", "b"))
join_words(c("a", "b", "c"))
join_words(c("a", "b", "c"), sep = " / ", and = "")
join_words(c("a", "b", "c"), and = "")
join_words(c("a", "b", "c"), before = "\"", after = "\"")
join_words(c("a", "b", "c"), before = "\"", after = "\"", oxford_comma = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.