In my dataset I have multiple columns which are character vectors (columns) with the same set of variables.
Lets say they are "Very Good" "Good" "Neutral" "Bad" "Very Bad".
Now my goal is to get a data.frame output, which displays for each column the number or count (n) for each of these variables.
I have tried:
apply(df[c("Col1", "Col2", "Col3")],2, table)
which gives me a good output, as integer vectors.
The problem is, that if the length of of these vectors differs, I get a list of integers, which i can not easily put into a data.frame to then work further with.
Are there any options to work around this?