Make a table of string frequency Make a table of string frequency r r

Make a table of string frequency


Use this to make the frecuency table:

table(x)

To sort just use sort.

sort(table(x), decreasing = TRUE)

Hope that helps


Similarly,

rle(sort(x))

will do the counting; you can then sort the results as desired.