Good day! I've been dealing with this problem for hours already. When running code chunks on R studio, the plot appears but when I want to knit it, it says: "Error in ggplot: object hotelRH.15 not found". Why is this so? When i tried doing other datasets, it knits by just stating the data. but mine does not. My codes are below:
hotelRH.15 <- dplyr::filter(hotels, hotel == "Resort Hotel" , arrival_date_year == "2015")
hotelRH.16 <- dplyr::filter(hotels, hotel == "Resort Hotel" , arrival_date_year == "2016")
hotelRH.17 <- dplyr::filter(hotels, hotel == "Resort Hotel" , arrival_date_year == "2017")
hotelCH.15 <- dplyr::filter(hotels, arrival_date_year == "2015", hotels == "City Hotel")
hotelCH.16 <- dplyr::filter(hotels, arrival_date_year == "2016", hotels == "City Hotel")
hotelCH.17 <- dplyr::filter(hotels, arrival_date_year == "2017", hotels == "City Hotel")
g <- ggplot(hotelRH.15, aes(arrival_date_month))
g + geom_bar()