how to get number of levels in factor in r code example Example: show factor levels in r #in R levels(x)