"Petr Pikal" <[EMAIL PROTECTED]> writes:
> Hallo
>
> I am not sure what you want to achieve.
>
> your factor has 3 levels but with only 2 different labels
>
> > hb
> [1] 1 1 1 1 1 1 2 2 2
> Levels: 1 1 2
>
> but
>
> > str(hb)
> Factor w/ 3 levels "1","1","2": 1 1 1 2 2 2 3 3 3
>
> so you ga
Hallo
I am not sure what you want to achieve.
your factor has 3 levels but with only 2 different labels
> hb
[1] 1 1 1 1 1 1 2 2 2
Levels: 1 1 2
but
> str(hb)
Factor w/ 3 levels "1","1","2": 1 1 1 2 2 2 3 3 3
so you gave only one label to level 1 and 2. You can give the same
label to any le
Hi guys,
I ran into a problem of not being able to create unique labels when creating a
factor. Consider an example below:
hb <- factor(c(1,1,1,2,2,2,3,3,3), levels=c(1,2,3),labels=c(1,1,2))
> hb
[1] 1 1 1 1 1 1 2 2 2
Levels: 1 1 2
> unique(hb)
[1] 1 1 2
Levels: 1 1 2
How come there are thr