title: Putting two Pie Charts in one
body: <p>I am trying to create a pie chart with my following data in R:</p>
  
  <pre><code>    2009    2010
  US  10  12
  UK  13  14
  Germany 18  11
  China   9   8
  Malaysia    7   15
  Others  13  15
  </code></pre>
  
  <p>The command I am using is:</p>
  
  <pre><code>slices&lt;-c(10,13,18,9,7,13,12,14,11,8,15,15)
   lbls &lt;- c("US","UK","Germany","China", "Malaysia", "Others","US","UK","Germany","China", "Malaysia", "Others") 
   pct &lt;- round(slices/sum(slices)*100)
   lbls &lt;- paste(lbls,"%",sep="")
   lbls &lt;- paste(lbls, pct)
   pie(slices,labels = lbls, col=rainbow(length(lbls)),  main="Pie Chart of Countries")
  </code></pre>
  
  <p>The figure that I am getting <img src="https://i.stack.imgur.com/nAUGJ.png" alt="is"></p>
  
  <p>Now how can I configure the graph so that the countries have same colour scheme? and they follow the same order in two halves, like first it should be US and the UK and so on.</p>
  
  <p>Two simplify the question I want to make two piecharts in one piechart, where one half of piechart represents 2009 and the other half 2010.</p>
  
  <p>kindly help.</p>
  
  <p>Thank you</p>