Learn R Programming

JointAI (version 1.1.0)

extract_lhs_varnames: 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)

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.

Arguments

formula

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

See Also

extract_lhs_string()