Combines objects horizontally by adding columns. For tbl_gpu objects, operations are performed on the GPU. For other objects, delegates to dplyr.
Usage
bind_cols(
...,
.name_repair = c("unique", "universal", "check_unique", "minimal")
)Arguments
- ...
Objects to bind (tbl_gpu, data.frame, vectors, or lists of these, flattened recursively as in
dplyr::bind_cols()). A vector becomes one column named by its argument name.NULLs are dropped.- .name_repair
How to handle duplicate column names:
"unique","universal","check_unique"or"minimal"
Details
If any input (including one inside a list) is a tbl_gpu, the result is a
tbl_gpu, wherever the tbl_gpu sits in the arguments. The exception is a
data frame input with a list or data frame column, which has no GPU form:
then dplyr binds the inputs on the CPU and the result is its data frame,
with the first input's class and groups. dplyr::bind_cols()
on a tbl_gpu input is handed to this function and gives the same result for the
four .name_repair strings above; any other .name_repair (a *_quiet
string, a function or a formula) is an error for a tbl_gpu.
vctrs::vec_cbind() and purrr::list_cbind() can't be intercepted and
raise an error for a tbl_gpu (use dplyr::bind_cols(list) instead of
list_cbind()).
