I want to do the opposite of this question, and sort of the opposite of this question, though that\'s about legends, not the plot itself.
The other SO questions seem
Notice that, when plotting, you're using only two columns of your data frame, meaning that, rather than passing your whole data.frame you could take the relevant columns x[,c("name", "var1")] apply na.omit to remove the unwanted rows (as Gavin Simpson suggests) na.omit(x[,c("name", "var1")]) and then plot this data.
My R/ggplot is quite rusty, and I realise that there are probably cleaner ways to achieve this.