df_merge_cols | R Documentation |
Combines columns by filling in missing values with values from other columns in a designated order.
df_merge_cols(df, cols)
df |
(df) Data frame. |
cols |
(chr) Variable names to merge. |
A vector.
tibble(
a = c(1, NA, NA),
b = c(-1, 2, NA),
c = c(-5, -9, 3)
) %>% df_merge_cols(letters[1:3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.