extract_lhs_varnames: Extract variable names from the left-hand side of a formula

View source: R/helpfunctions_formulas.R

extract_lhs_varnamesR Documentation

Extract variable names from the left-hand side of a formula

Description

This internal helper function extracts variable names from the left-hand side (LHS) of a formula or a list of formulas. It supports standard formulas, survival objects, transformations (e.g., log(x)), and multivariate outcomes (e.g., cbind(a, b, c)).

Usage

extract_lhs_varnames(formula)

Arguments

formula

A formula object, a list of formulas, or NULL.

Value

A character vector of variable names from the LHS of the formula, or a list of such vectors if a list of formulas is provided. Returns NULL if the input is NULL.

See Also

extract_lhs_string()


JointAI documentation built on Jan. 30, 2026, 5:07 p.m.