[R] remove pairs of missing values

Liaw, Andy andy_liaw at merck.com
Wed Mar 17 19:06:50 CET 2004

miss <- is.na(y)
y.good <- y[!miss]
x.good <- x[!miss]


> From: klea lambrou
>    hello R-users.I really need your help on these one.i have 
> two vectors
>    x and y of equal length.y contains missing values,so i 
> need to remove
>    them.i know how to do that for y but i also need the 
> corresponding x
>    value to be removed too.i cannot find or at least think of 
> a command
>    which will do this.can you please help me?
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

Notice:  This e-mail message, together with any attachments,...{{dropped}}

More information about the R-help mailing list