title: Sort 2 dimensional table in r by weekdays
body: <p>I am new to R language and was trying to plot following table using ggplot. I could not plot table using weekdays in order [ Mon,Tue,Wed,...]</p>
  
  <p>Is there any way to sort table ?</p>
  
  <pre><code>     UserType       Day   Freq
  1    Customer    Friday 106810
  2  Subscriber    Friday 260799
  3    Customer    Monday  89034
  4  Subscriber    Monday 253095
  5    Customer  Saturday 203406
  6  Subscriber  Saturday 175384
  7    Customer    Sunday 190026
  8  Subscriber    Sunday 160719
  9    Customer  Thursday  73510
  10 Subscriber  Thursday 269220
  11   Customer   Tuesday  65035
  12 Subscriber   Tuesday 270355
  13   Customer Wednesday  63419
  14 Subscriber Wednesday 273822
  
  tableWeek&lt;-table(data$usertype, data$weekday)
  tablePlot&lt;-as.data.frame(tableWeek) 
  names(tablePlot)&lt;-c("UserType","Day","Freq")
  ggplot(tablePlot,aes(x=Day,y=Freq,fill=UserType))+geom_bar(position="dodge",stat="identity")
  </code></pre>