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,
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
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
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
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
-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
6 matches
Mail list logo