I grouped the data frame I have using two variables (Species, Gender) and the counts of Grey Fox for males (blue) are zero. But the zero doesn't appear in the grouped data and is subsequently missing from the plot as well (attached). My current dataset is too big to share so I included a sample.
Sample Data and Code: Code:
df = data.frame(X = c(0,1,0,1), Y = c(0,1,0,0))
df %>%
group_by(X, Y) %>%
count()
Note: I converted both to factors but that didn't change the table/plot. Got the same results with tally and summarize functions as well. In this case, it was just one row so I used add_row function but I don't want to do that since I have another similar dataset where I'll need to add more than 5 rows.