[R] Ploting NA location points

Peter Malewski y0004379 at tu-bs.de
Fri Aug 11 10:14:33 CEST 2000


On Thu, 10 Aug 2000, Kenneth Cabrera wrote:

> Hello, to everybody!
> 
> Can anybody help me with this problem?
> 
> How can I plot a x,y coordinates, but to plot a "z" variable
> with a different color if it is a z missing value (NA)?

e.g.

y <- rnorm(10)
x <- rnorm(10)
z <- x
z[c(2,4)] <-NA
plot(x,y)
points(x[is.na(z)] , y[is.na(z)] ,col=2)

best wishes 
Peter

btw: you can use rug to visualize points that are NA at x or y.

** To YOU I'm an atheist; to God, I'm the Loyal Opposition. Woody Allen **
P.Malewski					Tel.: 0531 500965
Maschplatz 8					Email: P.Malewski at tu-bs.de
************************38114 Braunschweig********************************

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list