Does anyone know how to write an if else statement in R where if the departure delay is more than 15 minutes then the airline has to pay $75 for every minute delayed and if the departure delay is less than 15 minutes then there is no charge?
This is what I wrote but its throwing an error
mutate(`Departure Delay charges`= if_else(`departure_delay`>= '16'|`DEP_DELAY`<='15',75*`departure_delay`, "0" ))