I would like to use the "row number" information returned from performing a 
subset command on a dataframe.  

For example, I would like to automatically delete some rows from a dataframe if 
they match a criteria.  Here is my example below.  

data(airquality)
names(airquality)
subset(airquality, airquality$Month == 6) 

Now how do I delete the row numbers returned automatically?  

I know I can type
airquality_mod<-airquality[-c(32:60)]

However, I would like to check the row information and then use it to delete 
the stuff out of the dataframe. 

Thank again for any feedback and insights.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to