I have:
df <- data.frame(x = c("a", "a", "b"))
This:
table(df$x)
produces this:
a b
2 1
I would like to produce a string with the same information as table like so:
a:2 b:1
So given a vector (column of a dataframe I suppose). Is this possible?