I need some help with this graph, here's my code
ggplot(aes(x=situa_ence,fill=cs_sexo), data=dados) +
geom_bar(aes(y = (..count..)/sum(..count..)))
I need to put names in each bar
(1 =Sick, 2 = Not sick )
使用ifelse()
dados$situa_ence <- ifelse(dados$situa_ence == 1, yes = "Sick", no = "Not sick")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.