I have a problem with NA in a factor variable since ggplot includes them in the plot as if they are another category/level. I would like to drop the missing data.
I am sorry I don't have code handy at the moment, I tried to remove factor levels from dataset that I found at data()
and it did not work.
Had someone the same problem?
I tried the solution suggested here Remove unused factor levels from a ggplot bar plot but I get an error
Error: unexpected symbol in: mycode
Can someone suggest something?
Also, if there is no way to remove them from inside the ggplot code, how can I remove the NA from a factor variable?