Dataset with the(Pipe) Hotel_bookings
{r} Filtering dataset with the(Pipe)
Online ta _City hotel V2<-hotel _ bookings %<℅
Filter(hotel=="City Hotel")%<℅
Filter(Market_Segment=="Online TA")
Run Code Chunk
Please can someone in the Community help me understand this ?
That code does not make sense to me. Here is an explanation of part of it. Notice that I changed %<℅ to %>% and that filter has all lower case letters.
library(dplyr)
#Make a data frame named Online_ta _City_hotel_V2
Online_ta _City_hotel_V2 <- hotel_bookings %>% # start with the data frame named hotel_bookings
filter(hotel == "City Hotel") %>% #keep rows where hotel is "City Hotel"
filter(Market_Segment == "Online TA") #keep rows where Market_Segment is "Online TA"