Filtering and Plots in R/ 1. Filtering your data,2. Plotting your filtered data

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.


#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"

FJCC Thanks, for the help, I am going to apply and see if that works.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.