A logical data type stores Boolean values such as TRUE and FALSE. In an NBA results table, logical columns record whether each team won a quarter or the game. section 6.4.6
Use logical columns to represent and transform result conditions:
- Convert logical values with as.numeric(), changing FALSE to 0 and TRUE to 1 for counting and reshaping. section 6.4.6
Counting halftime-tied game outcomes
Six logical result combinations become numeric counts: HHH occurs 18 times, RRR 13 times, and HRR 6 times. The combinations describe who won the third quarter, fourth quarter, and game.

