Skip to content
Prev 53689 / 63421 Next

duplicated factor labels.

Hi Paul,

Now I see what you're getting at. I misread your original mail completely.
So we definitely agree, and wholeheartedly even.

The use case you just gave, is definitely in my top 5 of frustrations about
R. I would like to be able to assign the same label to multiple levels
without having to use eg dplyr::recode_factor() or some other vectorized
switch statement to recode all data first.

I understand "it's been like that 25 years", but I've looked hard to find a
use case where adding this behaviour would invalid existing code and
couldn't come up with something.

So I add my (totally insignificant) vote for adding the possibility of
assigning the same label to multiple levels in factor() itself.

Cheers and thank you for bringing this up!
On Fri, Jun 16, 2017 at 6:02 PM, Paul Johnson <pauljohn32 at gmail.com> wrote: