[R] Problem accessing row number from subset on a dataframe

2009-05-26 Thread Jason Rupert
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,

Re: [R] Problem accessing row number from subset on a dataframe

2009-05-26 Thread Mark Wardle
Hi. I may be missing what you're trying to achieve, but... what about subset(airquality, airquality$Month!=6) instead? You can do arbitrarily complex queries if you wish, combining terms logically. You don't have to use the subset function. You may find it helpful to see what the following

Re: [R] Problem accessing row number from subset on a dataframe

2009-05-26 Thread Jason Rupert
Wardle m...@wardle.org wrote: From: Mark Wardle m...@wardle.org Subject: Re: [R] Problem accessing row number from subset on a dataframe To: Jason Rupert jasonkrup...@yahoo.com Cc: R-help@r-project.org Date: Tuesday, May 26, 2009, 3:18 PM Hi. I may be missing what you're trying to achieve

Re: [R] Problem accessing row number from subset on a dataframe

2009-05-26 Thread Bert Gunter
Subject: Re: [R] Problem accessing row number from subset on a dataframe Mark, I really apprecaite your response and continue to be amazed by the responsiveness and support on the R forums. And, well actually, I would like to get the row number(s) and then delete or not via the row number. Again

Re: [R] Problem accessing row number from subset on a dataframe

2009-05-26 Thread Mark Wardle
row number from subset on a dataframe To: Jason Rupert jasonkrup...@yahoo.com Cc: R-help@r-project.org Date: Tuesday, May 26, 2009, 3:18 PM Hi. I may be missing what you're trying to achieve, but... what about subset(airquality, airquality$Month!=6) instead? You can do arbitrarily

Re: [R] Problem accessing row number from subset on a dataframe

2009-05-26 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jason Rupert Sent: Tuesday, May 26, 2009 1:55 PM To: Mark Wardle Cc: R-help@r-project.org Subject: Re: [R] Problem accessing row number from subset on a dataframe Mark