has_col: Detect if df has col

View source: R/utils.R

has_colR Documentation

Detect if df has col

Description

Detect if df has col

Usage

has_col(df, col)

Arguments

df

A dataframe.

col

A string or string vector.

Value

A dataframe.

Examples

colnames(mtcars)
has_col(mtcars, c("mpg", "cyl"))
has_col(mtcars, c("mpg", "foo"))


pivotea documentation built on Sept. 11, 2024, 5:22 p.m.