powered by
Check if logical expressions return what you expect with a truth table
TFtest(..., na = TRUE)
Expression(s) with logical operators to be evaluated, with single letters for variables. Each expression is to be separated with a comma
Logical: should NAs be included in the truth table? DEFAULT: TRUE
Truth table as data.frame with TRUE and FALSE (and NA) combinations
This is a nice way to check operator precedence, see Syntax
Syntax
logical
# NOT RUN { TFtest(!a & !b) TFtest(!a & !b, a&b, !(a&b)) TFtest(!a & !b | c) TFtest(!a & !b | c, na=FALSE) TFtest(!a) TFtest(a&b|c, (a&b)|c, a&(b|c), na=FALSE) # AND has precedence over OR # }
Run the code above in your browser using DataLab