Add a logical flag (new column) based on a pattern search across columns

flag_across(.data, code = NULL, cols = NULL, partial = FALSE, flag_name = NULL)

Arguments

.data

An object of either class data.frame or arrow .Dataset

code

A character string representing a search term.

cols

a vector of column names to search in

partial

A logical determining when partial matching should occur

flag_name

the name of the new column to create

Value

An object the same class as the input (methods for data.frame, Dataset, arrow_dplyr_query), with a new logical column

See also