Displaying 1 result from an estimated 1 matches for "smalllast".
Did you mean:
smallest
2010 Mar 01
2
Thougt I understood factors but??
Hi,
consider the following
> a<-gl(3,3,9)
> a
[1] 1 1 1 2 2 2 3 3 3
Levels: 1 2 3
> levels(a)<-3:1
> a
[1] 3 3 3 2 2 2 1 1 1
Levels: 3 2 1
> a<-gl(3,3,9)
> factor(a,levels=3:1)
[1] 1 1 1 2 2 2 3 3 3
Levels: 3 2 1
It is probably something obvious I missed, but reading the documentation
of factor, and levels I would have thought
that both should produce the same output as