pasteCols | R Documentation |
Paste together columns of a list/data frame
pasteCols( x, sep = " ", collapse = NULL, use_paste0 = FALSE, cols = NULL, by_name = FALSE )
x |
A list or data frame. |
sep |
A character sting to separate the terms. |
collapse |
An optional character string to separate the results. |
use_paste0 |
Boolean, if TRUE, will call paste0 instead of paste. |
cols |
An optional vector of column positions or names to paste together. If passing column names, set by_name to TRUE. The order of items in cols determines the order of the paste result. |
by_name |
Boolean, if TRUE, it quotes the items in cols to properly index the list by name (x[[1]] vs x[["col_a"]]). |
A string with the values in each column pasted together.
pasteCols(list("x" = c(1, 2, 3), "y" = c("a", "b", "c")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.