Classification to new column

For this sort of task, you can use the dplyr::case_when() function

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.