Outputs the objects, concatenating the representations.
performs much less conversion than
cat(… , file = "", sep = " ", fill = FALSE, labels = NULL, append = FALSE)
R objects (see ‘Details’ for the types of objects allowed).
a character vector of strings to append after each element.
a logical or (positive) numeric controlling how the output is
broken into successive lines. If
FALSE (default), only newlines
created explicitly by "\n" are printed. Otherwise, the
output is broken into lines with print width equal to the option
TRUE, or the value of
fill if this is numeric. Non-positive
fill values are
ignored, with a warning.
character vector of labels for the lines printed.
logical. Only used if the argument
file is the
name of file (and not a connection or
TRUE output will be appended to
file; otherwise, it will overwrite the contents of
cat is useful for producing output in user-defined functions.
It converts its arguments to character vectors, concatenates
them to a single character vector, appends the given
string(s) to each element and then outputs them.
No linefeeds are output unless explicitly requested by "\n"
or if generated by filling (if argument
file is a connection and open for writing it is written from
its current position. If it is not open, it is opened for the
duration of the call in
"wt" mode and then closed again.
Currently only atomic vectors and names are handled,
NULL and other zero-length objects (which produce
no output). Character strings are output ‘as is’ (unlike
print.default which escapes non-printable characters and
backslash --- use
encodeString if you want to output
encoded strings using
cat). Other types of R object should be
converted (e.g., by
before being passed to
cat. That includes factors, which are
output as integer vectors.
cat converts numeric/complex elements in the same way as
which is used by the S equivalent), so
"scipen" are relevant. However, it uses
the minimum field width necessary for each element, rather than the
same field width for all elements.
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.