[R] Efficient way to determine if a data frame has missing observations

2011-02-02 Thread H Roark
I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have missing data. For

Re: [R] Efficient way to determine if a data frame has missing observations

2011-02-02 Thread Erik Iverson
H Roark wrote: I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have

Re: [R] Efficient way to determine if a data frame has missing observations

2011-02-02 Thread Henrique Dallazuanna
Try this: subset(as.data.frame(xtabs( ~ city + var, df)), !Freq) On Wed, Feb 2, 2011 at 1:49 PM, H Roark hrbuil...@hotmail.com wrote: I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is