R: watch out when comparing vectors using “==”
Friday, September 25th, 2009This question was on the R-help mailing list today: I have a data frame “test”: test test$total [1] 7 7 8 8 9 9 10 10 to this: > rep(needed,length.out=length(test$total)) [1] 7 9 7 9 7 9 7 9 The two vectors just happen to coincide at test$total[1] and test$total[6]. The recycling is of course [...]