Parse a formula defining the conditions to pick a stat/test
Usage
parse_formula(x, f)
Arguments
x
The variable to test it on
f
A formula to parse
Value
A function to use as a stat/test
Details
Parse a formula defining the conditions to pick a stat/test
and return the function to use.
The formula is to be given in the form of
conditional ~ T | F
and conditions can be nested such as
conditional1 ~ (conditional2 ~ T | F) | F
The FALSE option can be omitted, and the TRUE can be replaced with NA