I have the following data:
Sp Type Val1 Val2
A One 200 50
A Two 100 10
C One 300 150
C Two 200 10
I did the following to get stacked barplot:
ggplot() +
geom_bar(data=test, aes(y = Val1, x = Sp, fill = Type), stat="identity",position='stack')
Hence, I get two stacked bars for A, B each with stacks of Type 1 & 2 (total size of A is 200+100 =300). Here, val2 is a fraction of unknowns in each Type. How do I overlay it in respective portions of stack? i.e in type A in Val1, fraction of unknown is Val2.
Thanks in Advance.
AP