I have a tricky problem. I have a factor where the labels of the factor are numbers. I want to collapse several levels into one and keep the other levels intact
I tried
fct_collapse(factor(c(1,3,6,9)),
`1` = "1",
`3` = "3",
group_other = "3+")
But I get this error.
Error in if (group_other) { : argument is not interpretable as logical
I tried putting the levels on the left side in quotations but same error.
Any help much appreciated
The
group_otheris deprecated, perhaps useother_level