[R] Removing row with smallest value, for a given factor

From: - - <sqidufbkqsdjvbqdskuvgc_at_yahoo.fr>
Date: Sat, 23 Apr 2011 14:05:21 +0100 (BST)


I have a table.
First column is a date, second column is an index and other columns contains some other values. I want to remove, for each date, the row with the smallest index (it is not necessarily 1).

ex: in the following table, I want to remove row 1 (2013-05-12 with index 2) and row 8 (2013-05-13 with index 1)

           day index values
1    2013-05-12    2  xxxx
2    2013-05-12    3  xxxx
3    2013-05-12    4  xxxx
4    2013-05-12    5  xxxx
5    2013-05-12    6  xxxx
6    2013-05-12    7  xxxx
7    2013-05-12    8  xxxx
8    2013-05-13    1  xxxx
9    2013-05-13    3  xxxx
10   2013-05-13    4  xxxx
11   2013-05-13    5  xxxx
12   2013-05-13    6  xxxx
13   2013-05-13    7  xxxx
14   2013-05-13    8  xxxx
15   2013-05-13    9  xxxx

16   2013-05-13   10  xxxx
17   2013-05-13   12  xxxx

Thank you for your help



R-help_at_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. Received on Sat 23 Apr 2011 - 13:47:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 23 Apr 2011 - 14:20:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive