I want to generate boxplot for a continuous variable (N) against a categorical variable (BL) grouped by another factor (A with 2 levels)
So, when I use the following code :
data$BL <-factor (data$BL, labels =c("0", "1" , "2"))
data$A <- factor (data$A, labels = c("0", "1"))
plot1 <- ggplot(data=data, aes(x = BL , y = N, fill = A)) +
geom_boxplot()
plot1
I end up with no box for the combination 0 by 0... I know from the dataset that there are individuals with the combination 0-0.. so why is there no box displayed?
Any advice and suggestions would be much appreciated Thanks