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.
get_formula_rhs(formula, with_tilde = FALSE)
A character string representing the right-hand side of the formula. If with_tilde
is TRUE
,
the string includes a leading tilde.
A formula object from which to extract the RHS.
Logical, indicating whether to include a tilde (~
) at the beginning of the RHS.
Defaults to FALSE
.