catty | R Documentation |
catty()
constructs a catty
vector (of class zmisc_catty
). A catty
vector is a character
vector that uses cat()
for print output, rather
than the standard print()
command. Apart from this, it behaves like a
standard character vector.
Objects of this class are convenient return values for functions that should
generally just print a desired value without the index information of a
normal print command. This is what happens if a function returning a catty
object is called interactively. However, the return value can also be
assigned to a variable for later use, making this more flexible than having
the function output the text directly.
catty(x, sep = " ")
x |
The |
sep |
The separator to output between elements of the |
The catty
vector.
x <- catty(letters)
x
y <- catty(month.name, sep="\n")
y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.