Re: [R] elegant way of removing NA's and selecting specific values from a data.frame

2011-07-06 Thread William Dunlap
ct.org] On Behalf Of Bert Gunter > Sent: Wednesday, July 06, 2011 8:50 AM > To: Jim Maas > Cc: r-help@r-project.org > Subject: Re: [R] elegant way of removing NA's and selecting > specific values from a data.frame > > ?"&" > > This is basic. Please re

Re: [R] elegant way of removing NA's and selecting specific values from a data.frame

2011-07-06 Thread Bert Gunter
?"&" This is basic. Please read "An Intro to R" before posting any more such questions if you have not already done so. -- Bert On Wed, Jul 6, 2011 at 8:35 AM, Jim Maas wrote: > I have a data.frame "e" and would like to extract the 23rd column, remove > any NA's and then remove any values >= 30

[R] elegant way of removing NA's and selecting specific values from a data.frame

2011-07-06 Thread Jim Maas
I have a data.frame "e" and would like to extract the 23rd column, remove any NA's and then remove any values >= 30. I can do it in steps such as this but have failed to figure out how to do it in a single line any suggestions? first <- e[,23] second <- first[!is.na(first)] third <- seco