is_crossed: Checks pairs of Variables for a crossed relationship

View source: R/Variable_relationships.R

is_crossedR Documentation

Checks pairs of Variables for a crossed relationship

Description

Given two variable names and a data.table, checks if the term1 is crossed with the term2. Two variables are at least partially crossed if at least some levels of term1 are paired with multiple levels of term2 and vice verse. We consider partially crossed a sufficient condition for crossed relationships here. In some cases, we care about fully crossed.

Usage

is_crossed(formula, data, only_full_crossed = F)

Arguments

formula,

term1 ~ term2

data

data.frame with columns (minimally) term1 and term2

only_fully_crossed

= FALSE If TRUE, then will return TRUE only if the variables are fully crossed, meaning that every level of term1 is paired with every level of term2 and vice versa.

Value

TRUE or FALSE


deruncie/PLS205_package documentation built on March 25, 2022, 2:29 a.m.