Re: [R] Trouble retrieving the second largest value from each row of a data.frame

2010-07-24 Thread mpward
THANKS, but I have one issue and one question. For some reason the "secondstrongest" value for row 3 and 6 are incorrect (they are the strongest) the remaining 10 are correct?? These data are being used to track radio-tagged birds, they are from automated radio telemetry receivers. I will appl

[R] Trouble retrieving the second largest value from each row of a data.frame

2010-07-23 Thread mpward
I have a data frame with a couple million lines and want to retrieve the largest and second largest values in each row, along with the label of the column these values are in. For example row 1 strongest=-11072 secondstrongest=-11707 strongestantenna=value120 secondstrongantenna=value60 Below