Displaying 3 results from an estimated 3 matches for "bearingdiff".
2011 Aug 10
2
using if then statements in a dataframe
...;apply".
if (t1.secondstrongest<-13000) {NA} else
if (noise>-13000) {NA} else
if ((abs(value.str1-value.str2))==120) {NA} else
if ((abs(value.str1-value.str2))==180) {NA} else
if ((abs(value.str1-value.str2))==240) {NA} else
if (value.str1 ==300&&value.str2 ==0) {value.str1_adj+ bearingdiff} else
if (value.str1 ==0&&value.str2 ==360) {value.str1_adj+360 - bearingdiff} else
if (value.str2<value.str1) {value.str1_adj-bearingdiff} else
if (value.str2>value.str1) {value.str1_adj+bearingdiff}
Below is an example of the dataframe
t1.secondstrongest Ant_test...
2010 Jul 26
1
After writing data in MMF using SEXP structure, can i reference in R?
...or 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 applying the following formula
diff <- ((strongest- secondstrongest)/100)
bearingdiff <-30-(-0.0624*(diff**2))-(2.8346*diff)
Then the bearing diff is added to strongestantenna (value0 = 0degrees) if
the secondstrongestatenna is greater (eg value0 and value60), or if the
secondstrongestantenna is smaller than the strongestantenna, then the
bearingdiff is substr...
2010 Jul 24
4
Trouble retrieving the second largest value from each row of a data.frame
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 is the code I am using and a truncated data.frame. Retrieving the largest value was easy, but I have