require_column: Require a column exists in a data frame

View source: R/data_utils.R

require_columnR Documentation

Require a column exists in a data frame

Description

Simple check that a single column exists. For checking multiple columns, use validate_dataframe() with required_cols parameter.

Usage

require_column(df, col, param_name = deparse(substitute(df)))

Arguments

df

Data frame to check

col

Column name to require

param_name

Name of the data frame parameter (for error message)

Value

Invisible TRUE if column exists, otherwise stops with error


ggpicrust2 documentation built on April 10, 2026, 5:06 p.m.