**From:** Christoph Scherber (*Christoph.Scherber@uni-jena.de*)

**Date:** Tue 04 May 2004 - 23:41:39 EST

**Next message:**Liaw, Andy: "RE: [R] lm(y~x) question: removing NA´s"**Previous message:**Liaw, Andy: "RE: [R] Seeing the definition of a function"**Next in thread:**Liaw, Andy: "RE: [R] lm(y~x) question: removing NA´s"**Maybe reply:**Liaw, Andy: "RE: [R] lm(y~x) question: removing NA´s"

Message-id: <40979D93.2010005@uni-jena.de>

Dear all,

I have a data frame with different numbers of NA´s in each column, e.g.:

x y

1 2

NA 3

NA 4

4 NA

1 5

NA NA

I now want to do a linear regression on y~x with all the NA´s removed.

The problem now is that is.na(x) (and is.na(y) obviously gives vectors

with different lengths. How could I solve this problem?

Thank you very much for any help.

Best regards

Chris

______________________________________________

R-help@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

**Next message:**Liaw, Andy: "RE: [R] lm(y~x) question: removing NA´s"**Previous message:**Liaw, Andy: "RE: [R] Seeing the definition of a function"**Next in thread:**Liaw, Andy: "RE: [R] lm(y~x) question: removing NA´s"**Maybe reply:**Liaw, Andy: "RE: [R] lm(y~x) question: removing NA´s"

*
This archive was generated by hypermail 2.1.3
: Mon 31 May 2004 - 23:05:07 EST
*