I am new to R. I have been trying for days to produce a 100% stacked bar chart that has one bar that show the percent of three different proteins.
I have been able to produce a percentage bar chart, but not stacked. This is what it looks like so far:
The data is just one column in excel. I put another column next to it full of "1". That seemed to help. So, basically I don't have a y column. It is more of a frequency percent chart of three proteins. I would like them to overlap on one bar. Can you help me?
This is the code I have used:
M <- read.csv('M.csv', header = TRUE)
ggplot(data = M) +
geom_bar(mapping = aes(x = Protein, y = ..prop.., group = 1), stat = "count")+
scale_y_continuous(labels = scales::percent_format())+
ggtitle("Colocalization between Mi-2 and Akirin compared to isolated Mi-2 and AK")