| cat0 {str2str} | R Documentation |
Concatenate and Print with No Separator
Description
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.
Usage
cat0(
...,
n.before = 1L,
n.after = 1L,
file = "",
fill = FALSE,
labels = NULL,
append = FALSE
)
Arguments
... |
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 |
Value
nothing as the function only prints and does not return an R object.
Examples
cat0(names(attitude))
cat0("MODEL COEFFICIENTS:", coef(lm(rating ~ critical + advance, data = attitude)),
n.before = 0, n.after = 2)