Farrel Buchinsky wrote: > It is easy to index on numeric variables. > How does one index on a variable that is a factor? > Same as for numeric objects. Example: R> x <- factor(c("A", "B")) R> x [1] A B Levels: A B R> x[1] [1] A Levels: A B