Learn R Programming

catalytic (version 0.1.0)

get_formula_rhs: Extract the Right-Hand Side of a Formula

Description

This function extracts the right-hand side (RHS) of a formula and returns it as a character string. Optionally, it can include a tilde (~) at the beginning of the RHS.

Usage

get_formula_rhs(formula, with_tilde = FALSE)

Value

A character string representing the right-hand side of the formula. If with_tilde is TRUE, the string includes a leading tilde.

Arguments

formula

A formula object from which to extract the RHS.

with_tilde

Logical, indicating whether to include a tilde (~) at the beginning of the RHS. Defaults to FALSE.