Is this what you want to do?
library(tidyverse)
# Sample data
brfss2013 <- data.frame(
genhlth = as.factor(c("Fair","Good","Good",
"Very good","Good","Very good")),
sex = as.factor(c("Female","Female",
"Female","Female","Male","Female"))
)
brfss2013 %>%
drop_na() %>%
count(genhlth, sex) %>%
ggplot(mapping = aes(x = genhlth, y = n)) +
geom_col(aes(fill = sex), position = "dodge")
Created on 2020-03-13 by the reprex package (v0.3.0.9001)