Learn R Programming

panelr (version 1.0.0)

extract_basis_variable: Extract the primary variable from a basis function call

Description

Extract the primary variable from a basis function call

Usage

extract_basis_variable(term)

Value

Character string of the variable name (e.g., "age", "x")

Arguments

term

Character string like "ns(age, df=3)" or "poly(x, degree=2)"