-2

when I am doing QQ plot on R it gave me errors because of the NA in the data set, I do not want to remove them from the data set but I need a code to ignore them while doing the plot?

  • Perhaps you can use `?na.omit` - a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) would help to answer your question. – talat Jun 24 '15 at 09:01

1 Answers1

0

Lets say you want to plot x and y, and y contain some na's you can use

   which(!is.na(y))

to find the index of the y's that are not NA. You can then do the plot by

   plot(y[which(!is.na(y))]~x[which(!is.na(y))])
Acarbalacar
  • 714
  • 2
  • 7
  • 19