title: How to change the order of ggplot2 facets
body: <p>I have a data frame "pd.long" with following structure:</p>
  
  <pre><code>&gt; str(pd.long)
  'data.frame':   144 obs. of  3 variables:
  $ Site   : Factor w/ 12 levels "BED","BEU","EB",..: 8 9 10 3 11 1 6 7 5 4 ...
  $ Month  : Factor w/ 12 levels "Dec","Jan","Feb",..: 1 1 1 1 1 1 1 1 1 1 ...
  $ Density: int  20 20 20 20 20 20 20 20 20 20 ...
  </code></pre>
  
  <p>I have constructed bar-plots with this piece of code:</p>
  
  <pre><code>ggplot(pd.long, aes(x=Month, y=Density, fill=Site))+
  geom_bar(stat = "identity", position = "dodge", fill = "darkgray")+
  xlab("Month") + ylab("Number")+
  facet_wrap(~Site, nrow = 3, scales = "free")
  </code></pre>
  
  <p>and the graphs look like this:
  <a href="https://i.stack.imgur.com/0CreC.png" rel="noreferrer"></a></p>
  
  <p>Everything was fine until I noticed that the levels of variable "Site" are not in the order of my choice. ggplot orders them alphabetically, as follows: </p>
  
  <pre><code>pd.long$Site
  Levels: BED BEU EB KAD KAU KB KER KOA KOB KOO PNS RO
  </code></pre>
  
  <p>However, I want them to be in the same order in which they appear in the variable column i.e.</p>
  
  <pre><code>KOA KOB KOO EB  PNS BED KB  KER KAU KAD RO  BEU
  </code></pre>
  
  <p>Any help will highly be appreciated. 
  Thank you</p>