 I am trying to generate a variable, based on conditions of another variable, but the mutate function is failing.