ONKELINX, Thierry schrieb:
Dear Bernd,
Omitting the NA values from the dataset will work.
ggplot(aes(x = x, color = g), data = na.omit(mydf)) + geom_density()
Dear Thierry,
thanks for your reply! Of course, regarding my little toy example
na.omit() perfectly works. However, my real data set consists of
hundreds of variables. So, one has to write
... data = na.omit(myHugeDataset[,c("var1","var99","var208")]) ...
Bernd
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.