Displaying 1 result from an estimated 1 matches for "s_bait".
2011 Mar 23
0
removing data randomly based on previous observations
...imple enough with an ifelse function. However, that is not my only bait
left variable (e.g., I have "2 short," "3 short," etc.). If I try to
include any other "yes" results in the ifelse function, it has not worked
how I have tried it so far. For example,
>catch$s_bait <- ifelse(bait_left=="1 short"|bait_left=="2 short", c(1,2),0)
this returns repeating 1 and 2s when the bait_left variable=="2 short".
>catch$s_bait <- ifelse(c(bait_left=="4 short"|bait_left=="1 short 1 legal"|
+ bait_left=="5 s...