Okay, someone explain this behaviour to me: Browse[1]> replace(rep(0, 4000), temp1[12] , temp2[12])[3925] [1] 0.4462404 Browse[1]> temp1[12] [1] 3926 Browse[1]> temp2[12] [1] 0.4462404 Browse[1]> replace(rep(0, 4000), 3926 , temp2[12])[3925] [1] 0
For some reason, R seems to shift indices along when doing this replacement. Has anyone encountered this bug before? It seems to crop up from time to time, seemingly at random. Any idea for a fix? Reassigning the variables seems to preserve the magicness of the numbers. It all seems very bizarre and worrying. If anyone is interested in a R workspace to reproduce this, email me. This is running in R 2.9. Zhou Fang ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.