sapply function to know levels of a facroe in r code example Example: show factor levels in r #in R levels(x)