How to build frequency table in R



I am currently working on the data in which I have a plot a histogram of the variable but I want to make frequency table in R for that I have first used table command on it.

for example


    1     2     3 
26902 44210 17746

But I want to make this to look like a frequency table.


You can try barchart from the lattice package:

barchart(table(train$Season), horizontal=F,col=2:4)


try this



CrossTable from the gmodels package is one of my go-to functions for frequency tables. I also recently discovered (but haven’t used yet) the following: