library(tidyverse)
theme_set(theme_light()) # setting the ggplot theme
library(ggmosaic) # make sure to install it first
<- fly |>
flying_etiquette filter(!is.na(do_you_recline), !is.na(rude_to_recline))
names(flying_etiquette)
[1] "id" "flight_freq"
[3] "do_you_recline" "height"
[5] "has_child_under_18" "three_seats_two_arms"
[7] "two_seats_one_arm" "window_shade"
[9] "rude_to_move_to_unsold_seat" "rude_to_talk_to_neighbor"
[11] "six_hr_flight_leave_seat" "reclining_obligation_to_behind"
[13] "rude_to_recline" "eliminate_reclining"
[15] "rude_to_switch_seats_friends" "rude_to_switch_seats_family"
[17] "rude_to_wake_neighbor_bathroom" "rude_to_wake_neighbor_walk"
[19] "rude_to_bring_baby" "rude_to_bring_unruly_child"
[21] "use_electronics_takeoff" "smoked_inflight"
[23] "gender" "age"
[25] "household_income" "education"
[27] "region"