coalesce_at: Coalesce 1+ Fields to an Existing Field

Description Usage Arguments See Also Examples

View source: R/coalesce_.R

Description

Coalesce a set of fields to an existing column 'col' in the order in which the arguments are supplied with 'col' leading.

Usage

1

Arguments

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?

See Also

tidyeval-compat,select,mutate_all,vars,mutate,coalesce,select_all

Other coalesce functions: coalesce_to()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Load Data
data(mtcars)

# To List of Vectors
cols_to_list(data = mtcars)


cols_to_list(data = mtcars,
             vs, am, gear)


# List to Dataframe
mtcars_list <- cols_to_list(data = mtcars)
list_to_tibble(mtcars_list)

meerapatelmd/rubix documentation built on Sept. 5, 2021, 8:30 p.m.