This is my submission of HW3
# Reading file
hotelBookings <- read_csv(file="../../_data/hotel_bookings.csv")
#Using required functions
hotelBookings %>%
select(1:4) %>%
filter(arrival_date_year==2015) %>%
arrange(4)
# A tibble: 21,996 × 4
hotel is_canceled lead_time arrival_date_year
<chr> <dbl> <dbl> <dbl>
1 Resort Hotel 0 342 2015
2 Resort Hotel 0 737 2015
3 Resort Hotel 0 7 2015
4 Resort Hotel 0 13 2015
5 Resort Hotel 0 14 2015
6 Resort Hotel 0 14 2015
7 Resort Hotel 0 0 2015
8 Resort Hotel 0 9 2015
9 Resort Hotel 1 85 2015
10 Resort Hotel 1 75 2015
# … with 21,986 more rows
# A tibble: 2 × 3
hotel mean n
<chr> <dbl> <int>
1 City Hotel 105. 79330
2 Resort Hotel 95.0 40060
Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".