I am trying to use the count()
function from the dplyr
package on every column of my data frame to count the number of each value per column in my df.
I tried :
apply(df, 2, function(x){count_(df,X[1])})
However, it does not work. If I do
apply(df, 2, function(x){count_(df,"one of my column's name")})
it only applies it to that column.
How can I apply it to every column in my data frame ?