Re: [R] Extracting dataframe rows containing NAs in one column

2011-10-25 Thread R. Michael Weylandt
I'm thinking you need to spend some time reading about subsetting in R: temp[!complete.cases(temp),] # I don't think you need/want/should use the [,4] Michael On Tue, Oct 25, 2011 at 12:38 PM, kaallen wrote: > Hi, > > I am working on a data set which looks like this: > >> head(temp) >  Day Mon

[R] Extracting dataframe rows containing NAs in one column

2011-10-25 Thread kaallen
Hi, I am working on a data set which looks like this: > head(temp) Day Month Year PW ROW 1 1 1 1959 NA 6.40 2 2 1 1959 6.65 6.35 3 3 1 1959 2.50 3.60 4 4 1 1959 0.60 2.25 5 5 1 1959 0.85 0.30 6 6 1 1959 0.00 2.20 I am trying to extract all the rows cont

Re: [R] Extracting dataframe rows containing NAs in one column

2011-10-25 Thread Pete Brecknock
kaallen wrote: > > Hi, > > I am working on a data set which looks like this: > >> head(temp) > Day Month Year PW ROW > 1 1 1 1959 NA 6.40 > 2 2 1 1959 6.65 6.35 > 3 3 1 1959 2.50 3.60 > 4 4 1 1959 0.60 2.25 > 5 5 1 1959 0.85 0.30 > 6 6 1 1959 0.00 2.20