title: R ggplot2: Barplot partial/semi stack
body: <p>I have a barplot situation where I would like some of the levels to be stacked and some to be dodged. Is this possible? Here is a working example.</p>
  
  <pre><code>library(ggplot2)
  library(reshape)
  
  dat &lt;- data.frame(name=c("a","b","c","d"),
             full=c(124,155,122,145),
             parta=c(86,72,40,26),
             partb=c(38,83,82,119))
  
  dat1 &lt;- reshape::melt(dat,id.vars=c("name"))
  
  #stack
  ggplot(dat1,aes(x=name,y=value,group=variable,fill=variable))+
    geom_bar(stat="identity",position="stack")+
    ggtitle("stack")
  
  #dodge
  ggplot(dat1,aes(x=name,y=value,group=variable,fill=variable))+
    geom_bar(stat="identity",position="dodge")+
    ggtitle("dodge")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/idxj6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/idxj6.png" alt="partial-stack"></a></p>
  
  <p>In the above example, figure 1 and figure 2 (from left) are standard barplots. Figure 3 is modified to what I am looking for. I would like level 'full' to stay 'dodged' while 'parta' and 'partb' to be stacked together. </p>
  
  <p>This is a dummy example. But, the practical use is when I want to show
  full value for something and then show how that splits into sub-components. The example above is a single split. Perhaps one might want to show multiple splits. See figure below.</p>
  
  <p><a href="https://i.stack.imgur.com/TFMCy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TFMCy.png" alt="split"></a></p>
  
  <p>Red is composed of a certain amount of blue and green. Green is further composed of a certain amount of yellow and pink. Maybe there is a better way to do this.</p>