I'm having issues with faceted pie charts.
Here's the head of my dataset.
> head(pie)
piper prop bat
1 P. sancti-felicis 0.617593433 Cs
2 P. reticulatum 0.617593433 Cs
3 P. colonense 0.069142205 Cs
4 P. multiplinervium 0.007650765 Cs
5 P. peltatum 0.006790803 Cs
6 P. umbricola 0.102377661 Cs
And here is the code I'm attempting...
a <- ggplot(pie, aes(x = piper,y=prop, fill = piper)) +
+ geom_bar(width = 1,stat='identity')
b <- a + coord_polar(theta = "y", start = 0, direction = 1)
b + facet_grid(facets=. ~ bat)
It seems to be displaying in a coxcomb pie chart, when I want to show a regular pie chart separating piper by color. The three pie charts are separated correctly by bat. Would greatly appreciate suggestions!