powered by
Detect if df has col
has_col(df, col)
A dataframe.
A string or string vector.
colnames(mtcars) has_col(mtcars, c("mpg", "cyl")) has_col(mtcars, c("mpg", "foo"))
Run the code above in your browser using DataLab