# Problem with qplot

#### danielwalther

##### New Member
I am new to both R and ggplot2, so if this is an embarrassingly simple issue to solve, then I hope you'll still bear with me. I am trying to produce a bar chart using qplot and condition it on another (factor) variable. I do this using the facets command, i.e.

Code:
qplot(x, facets=.~f)
However, my factor variable has missing values. I don't want to delete all of these, I just want a bar chart of my x variable where the factor variable is not missing. Qplot removes missing values from the main plotting variables per default (it does this in scatter plots too when you have "qplot(x, y)".

However, it does not remove missing data from factor variables that are used as facets or for colors. Instead missing data are treated as a separate category and also plotted in the graph! I have tried typing na.rm=TRUE but too no avail.

Does anyone have any solution for this problem? Thank you for your help.