Coalesce a set of fields to an existing column `col` in the order in which the arguments are supplied with `col` leading.
coalesce_at(data, col, ..., remove = TRUE)
data | A dataframe or tibble. |
---|---|
col | Target column. |
... | Other columns in addition to `col` that will be coalesced in the correct order of precedence. |
remove | Should columns supplied in `...` be removed in the output? |
tidyeval-compat
,select
,mutate_all
,vars
,mutate
,coalesce
,select_all
Other coalesce functions:
coalesce_to()
#> Error in cols_to_list(data = mtcars): could not find function "cols_to_list"cols_to_list(data = mtcars, vs, am, gear)#> Error in cols_to_list(data = mtcars, vs, am, gear): could not find function "cols_to_list"# List to Dataframe mtcars_list <- cols_to_list(data = mtcars)#> Error in cols_to_list(data = mtcars): could not find function "cols_to_list"#> Error in tibble::as_tibble(list): object 'mtcars_list' not found