check_formula: Check the formula statement

View source: R/utils.R

check_formulaR Documentation

Check the formula statement

Description

This function verifies that all variables specified in the formula are present in the provided data frame. If any variables are missing, the function will stop and return an error message listing the missing variables.

Usage

check_formula(formula, data)

Arguments

formula

Formula. The model formula that specifies the relationship between the dependent and independent variables.

data

Data frame. The data frame in which to check for the presence of variables specified in the formula.

Value

Invisibly returns NULL if all variables are present. Stops with an error if any variables are missing.


CCI documentation built on Aug. 29, 2025, 5:17 p.m.