R: convert to factor with order of levels same with case_when R: convert to factor with order of levels same with case_when r r