cat {base} | R Documentation |
Prints the arguments, coercing them if necessary to character mode first.
cat(... , file = "", sep = " ", fill = FALSE, labels = NULL,
append = FALSE)
... |
R objects which are coerced to character strings, concatenated, and printed, with the remaining arguments controlling the output. |
file |
A connection, or a character string naming the file
to print to. If
|
sep |
character string to insert between the objects to print. |
fill |
a logical or numeric controlling how the output is
broken into successive lines. If |
labels |
character vector of labels for the lines printed.
Ignored if |
append |
logical. Only used if the argument |
cat
converts its arguments to character strings, concatenates
them, separating them by the given sep=
string, and then
prints them.
No linefeeds are printed unless explicitly requested by "\n"
or if generated by filling (if argument fill
is TRUE
or
numeric.)
cat
is useful for producing output in user-defined functions.
None (invisible NULL
).
print
, format
, and paste
which concatenates into a string.
## print an informative message
cat("iteration = ", iter <- iter + 1, "\n")
## `fill' and label lines:
cat(paste(letters, 100* 1:26), fill = TRUE,
labels = paste("{",1:10,"}:",sep=""))