This would do it in your example: > levels(animals$V1) <- c("cat","tiger","dog","fish") > table(animals)
cat tiger dog fish 2 2 0 0 HTH David cat tiger dog fish 2 2 0 0 On 11 April 2012 14:21, Daniel Gabrieli <daniel.gabri...@gmail.com> wrote: > animals = as.data.frame(animals) > > table(animals$V1) > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.