I am a new user to R. I tried to filter multiple objects with conditions but got an error. Data set is Hotel Bookings assigned as Bookings.
bookings %>%
filter((arrival_date_year ==2015 | arrival_date_year ==2016) & (arrival_date_month =="June")) %>%
filter %!in% (reservation_status == ("Canceled"))
I even tried it in a line. I wanted to use the not operator but it didnt work.
bookings %>%
filter((arrival_date_year ==2015 | arrival_date_year ==2016)& (arrival_date_month =="June")& reservation_status== !("Canceled"))
But here i am unable to apply the not operator correctly. It showed error. Please tell my mistake.
It showed
Error in filter()
:
! Problem while computing ..1 = ... & reservation_status == (!("Canceled"))
.