My code right now is as following:
Plot1 <- ggplot (data=dat) +
geom_bar(position = "dodge", aes(x=indoor_allergies_diagnosed, y = after_stat(count/sum(count)), fill=symptomatic))
#symptomatic is a "0"/"1" variable, dat is a dataframe with 100+variables
And it gives me a barplot in which the percentage of all values in the plot is 100%, (symptomatic and non-symptomatic together). However I'm trying to get the percentages for symptomatic and non-symptomatic to each be 100%. (or for that matter for each category of "fill")
Is there an easy way to do so?
