Something like this?
demog <- data.frame(stringsAsFactors = FALSE,
ID = c(17703, 19060, 19994, 14185, 22006, 22165, 22282, 22749, 15440,
14915, 24558, 16776, 17305, 13403, 19785, 19328, 23735, 16787,
17300, 22410, 20211, 21602, 20619, 19420, 17440, 23588, 22201,
23625, 22164, 4626, 9899, 13102, 23056, 20498, 18521, 9263,
13144, 20216, 851, 18999),
GENDER = c("W", "W", "M", "W", "M", "M", "W", "W", "W", "W",
"M", "M", "M", "M", "M", "M", "M", "M", "W", "W",
"W", "W", "W", "M", "M", "M", "W", "M", "M", "M", "M",
"M", "W", "M", "M", "M", "M", "W", "W", "M"))
library(ggplot2)
library(dplyr)
demog %>%
count(GENDER) %>%
ggplot(aes(x = GENDER, y = n, fill = GENDER)) +
geom_col() +
geom_text(aes(label = n),
nudge_y = 2) +
scale_fill_manual(values=c("blue", "red"))
