I want to do a count of the number of times a number appears in a df. I specifically want a variable that outputs the # and the frequency count. Here is some data, although this is an abridged version of the data. I have close to 45 columns.
a1 b1 c1
23 23 1
24 4 18
2 2 2
18 NA NA
I want this:
value freq
1 1
2 2
4 1
18 2
23 2
24 1
I tried this, but it's not doing what I want it to.
library(plyr)
count(df, vars = NULL, wt_var = NULL)
Can someone help?