split_interactions: Split interaction terms into their component variables

View source: R/utils.R

split_interactionsR Documentation

Split interaction terms into their component variables

Description

Split interaction terms into their component variables

Usage

split_interactions(x, by = "\\*|:")

Arguments

x

(character)
string representing the interaction usually in the form x:y or x*y.

by

(character)
regex with which to split the interaction term by.

Value

a vector of strings where each element is a component variable extracted from interaction term x.

Examples

split_interactions("x:y")
split_interactions("x*y")


teal.modules.clinical documentation built on April 4, 2025, 12:35 a.m.