print_c | R Documentation |
Prints a vector to paste into an R script
print_c(x = read_clipboard(), sorted = TRUE, null = TRUE)
x |
A vector (defaults to reading the clipboard) |
sorted |
If |
null |
If |
This sorts (if set) and provides unique values for each element in x
and
prints then as a call to c
. This can be useful for copying data that you
want to save as a vector in an R script.
The result is both called in cat()
as well as copied to the clipboard.
Invisibly, as a character
vector, the object printed to the console
print_c(1:10)
print_c(letters[1:3])
print_c(month.abb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.