Concatenate and Print with No Separator
cat0
concatenates and prints objects without any separator. cat0
is to cat
as paste0
is to paste
. It also allows you to
specify line breaks before (n.before
) and after (n.after
) the
the printing of the concatenated R objects. cat0
function can be useful
in conjunction with sink
for quick and dirty exporting of results.
cat0( ..., n.before = 1L, n.after = 1L, file = "", fill = FALSE, labels = NULL, append = FALSE )
... |
one or more R objects. See details of |
n.before |
integer vector of length 1 specifying how many line breaks to have before printing the concatenated R objects. |
n.after |
integer vector of length 1 specifying how many line breaks to have after printing the concatenated R objects. |
file |
A connection or a character string naming the file to print to.
If "" (default), |
fill |
A logical or (positive) numeric vector of length 1 controlling how
the output is broken into successive lines. If FALSE (default), new line breaks are
only created explicity by |
labels |
A character vector of labels for the lines printed. Ignored if
|
append |
A logical vector of length 1. Only used if the argument |
nothing as the function only prints and does not return an R object.
cat0(names(attitude)) cat0("MODEL COEFFICIENTS:", coef(lm(rating ~ critical + advance, data = attitude)), n.before = 0, n.after = 2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.