table() function

Retrieving information from the table function:

x=c("river", "stream","stream","stream","river","river","river","stream","stream","stream", "flood")
y= table(x)
names(y)
as.vector(y)
sort(y,decreasing=TRUE)

Tags: