search for: uselevel

Displaying 1 result from an estimated 1 matches for "uselevel".

Did you mean: userlevel
2011 Feb 23
1
Easily switchable factor levels
...was wondering about ways to attach multiple sets of level codes to a factor. It would work something like this: > foo=multifactor(sample(letters,5),levels=letters,levelname="lower") > foo [1] m u i z b Levels: a b c d ... y z > levels(foo,"upper") = LETTERS > uselevels(foo,"upper") > foo [1] M U I Z B Levels: A B C D E F....Z > uselevels(foo,"lower") > foo [1] m u i z b Levels: a b c d ....z In this way you could easily switch your levels from M and F to Male and Female, or Hommes et Dames, without having to do levels(foo)...