How to build frequency table in R

r

#1

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

table(train$Season)

    1     2     3 
26902 44210 17746

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


#2

You can try barchart from the lattice package:

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

#3

try this

library(pylr)
count(train,‘Season’)


#4

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: http://rstudio-pubs-static.s3.amazonaws.com/6975_c4943349b6174f448104a5513fed59a9.html