factor with levels in r for rating column code example Example: show factor levels in r #in R levels(x)