I have the data.frame below. I want to add a column that classifies or group my data according to column 1 (inputrate) in that way that the first series of inputrate (1 to 2)470,470 is in group 1, the second series of (3) 450 is in group 2, the third series of (4) 470 is in group 3,the fourth series of (5 to 7)460,460,460 is in group4 and so on. Such, as indicated in the last column---
INPUTRATE TEMP1 TEMP2
470 355.4972 407.2139
470 363.2138 414.4102
450 370.8389 414.6563
470 381.3884 413.6328
460 386.9973 401.3242
460 385.2969 388.0488
460 390.3884 384.6963
OUTPUT
INPUTRATE TEMP1 TEMP2 group
470 355.4972 407.2139 1
470 363.2138 414.4102 1
450 370.8389 414.6563 2
470 381.3884 413.6328 3
460 386.9973 401.3242 4
460 385.2969 388.0488 4
460 390.3884 384.6963 4
Then based on no. of elements in particular group, I have to create a dataframe which have highest no. of same inputrate element.