I have imported data from a file into a data frame in R. It is something like this.
Name Count Category A 100 Cat1 C 10 Cat2
check out:
cut()
recode()
car