combine {dplyr} | R Documentation |
combine()
acts like c()
or
unlist()
but uses consistent dplyr coercion rules.
If combine()
it is called with exactly one list argument, the list is
simplified (similarly to unlist(recursive = FALSE)
). NULL
arguments are
ignored. If the result is empty, logical()
is returned.
Use vctrs::vec_c()
if you never want to unlist.
combine(...)
... |
Vectors to combine. |
bind_rows()
and bind_cols()
in bind.
# combine applies the same coercion rules as bind_rows() f1 <- factor("a") f2 <- factor("b") c(f1, f2) unlist(list(f1, f2)) combine(f1, f2) combine(list(f1, f2))