data(Osa)
# print the truth table
truthTable(Osa, outcome="OUT", show.cases=TRUE)
# print the complete truth table
truthTable(Osa, outcome="OUT", complete=TRUE, show.cases=TRUE)
# save the result into an R object:
mytable <- truthTable(Osa, outcome="OUT", complete=TRUE, show.cases=TRUE, quiet=TRUE)
mytable # or print.tt(mytable)
# check the components
mytable$tt # the truth table itself
mytable$indexes # base 10 representation of input combinations
mytable$noflevels # number of levels from each causal condition
Run the code above in your browser using DataLab