Hi! I need to put 2 histograms one over the other in the same plot. The variable it plots will be the same but it is filtered by 2 different criteria (some of which overlap). So, I need to plot these while also changing it to % of frequency instead of just frequency. Sample data for clarity:
height <- c(10, 12, 11, 15, 9, 18) female <- c(1, 0, 1, 0, 0, 1) treat <- c(0, 1, 1, 0, 1, 1)
So I want to plot heights of female and heights of treated people with the y axis being % of total instead of just a simple count/frequency. Tips on a clear legend, title and formatting would be massively appreciated!
Sorry if this is not super clear, I am a little confused by this. Thank you a ton!