I have a data frame which consists of three categorical variables, and I want to find the frequency of each combination and sort the result by the frequency in descending order as follow:
my data:
A LEVEL1 PASS
A LEVEL1 FAIL
B LEVEL2 PASS
A LEVEL1 PASS
B LEVEL2 PASS
A LEVEL1 PASS
the result should be as follow :
A LEVEL1 PASS 3
B LEVEL2 PASS 2
A LEVEL1 FAIL 1
I use plyr library,
myfreq<-count(myresult,vars = NULL, wt_var = NULL)
myfreq<-myfreq[order-myfreq$freq,]
In the beginning, it works, but then it just gives me this error:
Error in grouped_df_impl(data, unname(vars), drop) : Column
vars
is unknown
the other libraries I used are rJava
and dplyr
thanks