status1 <- c("No Phonecall", "Phonecall")
> no1 <- c(444, 176)
> yes1 <- c(110, 24)
> tata <- data.frame(status1, no1, yes1)
below is an example of a dataframe..essentially it is the number of patients that need to be seen in a practice after an intervention (phonecall). One cohort (the larger one) was our comparator (no phonecall took place) and the second cohort (the smaller one),our intevention (a phonecall to patient) was invovled.
I can get the graphs I require based on the folllowing code
tata %>%
gather(key = "success", value = value, -status1) %>%
ggplot(aes(y = value, x = status1, fill = success)) +
geom_bar(position = "dodge", stat = "identity") + scale_fill_manual(values = c("green", "red"))
However, I would much rather the Y axis was displayed in percentages rather than the actual value, as this would clearly be more meaningful. Can anyone help please?
Thanks,
S