cat2 | R Documentation |
Same as base::cat()
but with an additional argument end
, which gets printed after all other elements. Inspired by pythons print
command.
cat2(
...,
sep = " ",
end = "\n",
file = "",
append = FALSE,
fill = FALSE,
labels = NULL
)
... |
R objects (see 'Details' for the types of objects allowed). |
sep |
a character vector of strings to append after each element. |
end |
a string to print after all other elements. |
file |
A connection, or a character string naming the file to print to. If |
append |
logical. Only used if the argument |
fill |
a logical or (positive) numeric controlling how the output is broken into successive lines. If |
labels |
character vector of labels for the lines printed. Ignored if |
No return value, called for side effects
base::cat()
x <- 1
cat("x:", x, "\n") # prints 'Number: 1 \n' (with a space between 1 and \n)
cat2("x:", x) # prints 'Number: 1\n' (without space)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.