I am trying to create a two-variable histogram but when I run my code, the graph comes out with just one colour.
Here is my code:
library(car) geography <- recode(simd$urban,"0='rural';1='urban'",as.factor = TRUE) class(geogrphy) ggplot(data = simd)+ geom_histogram(mapping=aes(illnes`, fill='geography'), binwidth = 20)
Any idea what I am doing wrong?
2.1m questions
2.1m answers
60 comments
57.0k users