[R] understanding the no-label concept

moonkid at posteo.org moonkid at posteo.org
Thu Oct 16 21:09:18 CEST 2014


On 2014-10-11 15:14 William Dunlap <wdunlap at tibco.com> wrote:
> You can use 'factors' to assign labels to small integer values.  E.g.,
>    > x <- c(1,2,3,4,3)
>    > fx <- factor(x, levels=1:5,
>    > labels=c("One","Two","Three","Four","Five")) table(fx)
>    fx
>      One   Two Three  Four  Five
>        1     1     2     1     0

Looks nice. It works! Thanks.

Now I will refere (going back) to the doc to try to understand the
concept behind it.

Reading the introduction before that had no effect on my
understanding. ;)



More information about the R-help mailing list