Re: [R] remove NA in df results in NA, NA.1 ... rows

2012-12-13 Thread arun
the list elements differ in length. A.K. - Original Message - From: "raphael.fel...@art.admin.ch" To: r-help@r-project.org Cc: Sent: Thursday, December 13, 2012 3:20 AM Subject: [R] remove NA in df results in NA, NA.1 ... rows Good morning! I have the following data

Re: [R] remove NA in df results in NA, NA.1 ... rows

2012-12-13 Thread jim holtman
You can use "complete.cases": df <- df[complete.cases(df), ] On Thu, Dec 13, 2012 at 3:20 AM, wrote: > Good morning! > > I have the following data frame (df): > > X.outer Y.outer X.PAD1 Y.PAD1 X.PAD2 Y.PAD2 X.PAD3 Y.PAD3 > X.PAD4 Y.PAD4 > 73 574690.0 179740.0 574690.2 179740.0

Re: [R] remove NA in df results in NA, NA.1 ... rows

2012-12-13 Thread Jeff Newmiller
is.na(df2) is not doing what you think it is doing. Perhaps you should read ?na.omit. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] remove NA in df results in NA, NA.1 ... rows

2012-12-13 Thread Anthony Damico
df2 <- df2[!is.na(df2),] isn't doing what you want it to do because df2 is a data.frame and not a vector to solve your problem, review http://stackoverflow.com/questions/4862178/r-remove-rows-with-nas-in-data-frame On Thu, Dec 13, 2012 at 3:20 AM, wrote: > Good morning! > > I have the f

Re: [R] remove NA in df results in NA, NA.1 ... rows

2012-12-13 Thread Gerrit Eichner
Hi Raphael, see below. I have the following data frame (df): ... > df2 X.PAD2 Y.PAD2 73 574618.3 179650 74 574719.0 179688 75 574719.0 179688 76 574723.5 179678 77 574724.9 179673 78 574747.1 179598 79 574641.8 179570 80 574639.6 179573 81 574618.3 179650 82 NA NA 83 NA

[R] remove NA in df results in NA, NA.1 ... rows

2012-12-13 Thread raphael.felber
Good morning! I have the following data frame (df): X.outer Y.outer X.PAD1 Y.PAD1 X.PAD2 Y.PAD2 X.PAD3 Y.PAD3 X.PAD4 Y.PAD4 73 574690.0 179740.0 574690.2 179740.0 574618.3 179650 574729.2 179674 574747.1 179598 74 574680.6 179737.0 574693.4 179740.0 574719.0 179688 574831.8 17969