I have the following data frame (this is an example and the dataframe can contain more columns)
SelectVar
a b c l p v aa ff
1 Dxa2 Dxa2 Dxa2 Dxa2 Dxa2 Dxb2 Dxb2 Dxb2
2 Dxb2 Dxb2 Dxb2 Dxd2 Dxi2 Dxc2 Dxd2 Dxi2
3 Dxc2 Dxd2 Dxi2 Dxi2 tneg Dxd2 Dxi2 tneg
I would like to count the frequency of the elements without convert it into a vector and using table or by indicating the element like in
length(SelectVar[SelectVar=="Dxa2"])
Is there any other way as to count the frequencies of the elements than the two mentioned in the above paragraph for the sample dataframe.