I'm sorry, it will only let me show the first 10 rows.
data.frame(
stringsAsFactors = FALSE,
Group = c("Non-Fertile Chip",
"Non-Fertile Chip","Fertile Chip","Fertile Chip",
"Non-Fertile Chip","Fertile Chip","Non-Fertile Chip",
"Non-Fertile Chip","Fertile Chip","Non-Fertile Chip"),
NTopQualityEmbryos = c("Yes","Yes","Yes","Yes",
"Yes","No","Yes","Yes","No","No")
)
And this are the codes I've trying:
g4 <- ggplot(TFMqe, mapping=aes(x=NTopQualityEmbryos, y=prop.table(stat(count)), fill=Group, label=scales::percent(prop.table(stat(count))))) + geom_bar(position=position_dodge2()) + theme(legend.position="bottom") + geom_text(stat_count, position = position_dodge2(.9), vjust=1.6, color="white", size=3.5) + theme_minimal() + scale_y_continuous(label= scales::percent) + labs(x=NTopQualityEmbryos, y=Percentatges, fill = Group)
And:
g5 <- ggplot(TFMqe, aes(label=NMediumQualityEmbryos, fill=Group)) + geom_bar(stat_identity, position=position_dodge2()) + theme(legend.position="bottom") + geom_text(aes(label=NMediumQualityEmbryos), vjust=1.6, color="white", size=3.5) + theme_minimal()
Thanks!