printc | R Documentation |
It's often needed to create a vector literally even the vector can be obtained in code. For example a sbuset of column names can be get with number index, but it's not safe to use number index in code. Use this function to turn the output of number index into literal format, then you can copy the output to code.
printc(x)
x |
a vector holding items x1, x2, ... |
string of "c("x1", "x2")"
printc(names(mtcars)[1:3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.