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.gabrieli@gmail.com> wrote:

> animals = as.data.frame(animals)
>
> table(animals$V1)
>

	[[alternative HTML version deleted]]

