Hi,
I want to creat a bar chart showing the pay mix (base pay+variable pay) in a company vs external market.
I have created a data frame as below.
country pay.type BS market
1 France base 40000 40000
2 Belgium base 45000 37000
3 Spain base 36000 36000
4 France var 7000 8000
5 Belgium var 12000 12000
6 Spain var 8000 7200
Below is my R script which does work? Is there a way to put market pay mix and BS pay mix in the same bar chart?
P<- ggplot(pay.mix.test, aes(x=country,y=BS, fill=pay.type))+geom_bar(position="stack",stat="identity")
P+ggplot(pay.mix.test, aes(x=country,y=market, fill=pay.type))+geom_bar(position="stack",stat="identity")
Error: Can't addggplot(pay.mix.test, aes(x = country, y = market, fill = pay.type))
to a ggplot object.