paste_and_cat | R Documentation |
The available functions are:
paste_()
is the same as paste0
but uses an underscore to separate
cat0()
is analogous to paste0
but for cat
catN()
is the same as cat0
but automatically inserts a new line after the cat
paste_series()
paste a series of things with a conjunction
paste_oxford()
shortcut for paste_series
as oxford comma
paste_(..., collapse = NULL)
cat0(..., file = "", fill = FALSE, labels = NULL, append = FALSE)
catN(..., file = "", fill = FALSE, labels = NULL, append = FALSE)
paste_series(
...,
sep = c(",", ";"),
conjunction = c("and", "or", "&"),
use_oxford_comma = TRUE
)
paste_oxford(...)
... |
one or more R objects, to be converted to character vectors. |
collapse |
an optional character string to separate the results. Not
|
file |
character - A connection, or a character string naming the file to print to. If "" (the default), cat prints to the standard output connection, the console unless redirected by sink. |
fill |
a logical or (positive) numeric controlling how the output is broken into successive lines. see |
labels |
character vector of labels for the lines printed. Ignored if fill is FALSE. |
append |
logical. Only used if the argument |
sep |
a character vector of strings to append after each element |
conjunction |
indicates the ending conjunction. e.g. setting to "and" would make c("a", "b", "c") paste into "a, b, and c" |
use_oxford_comma |
logical - do you want to use an oxford comma at the end? |
Steven Nydick, steven.nydick@kornferry.com
paste_series("a")
paste_series("a", "b")
paste_series("a", "b", "c")
# works if putting entries into c function
paste_series(c("a", "b", "c"), "d")
# can use oxford comma or not
paste_series("a", "b", "c",
use_oxford_comma = TRUE)
paste_series("a", "b", "c",
use_oxford_comma = FALSE)
# makes no difference if fewer than 3 items
paste_series("a", "b",
use_oxford_comma = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.