What does this warning mean precisely?
When R replaces parts of a vector with another vector, it repeats the replacing value until it is as long as the number of values it needs to replace. For example:
> x = 1:10 > x[1:3]=1
- will do, effectively, x[1:3] = rep(1,3)
Now, if you replace with a vector that isn't an integer multiple of the things being replaced, you get that error:
> x[1:3]=c(1,2) Warning message: number of items to replace is not a multiple of replacement length
Note that if it is an integer multiple, you don't get the error:
> x[1:6]=c(1,2)
but it repeats the (1,2) 3 times to fill the six places:
> x [1] 1 2 1 2 1 2 7 8 9 10
Is there any reason to care about it?
Yes, it usually means you've specified something wrong. What have you done?
Baz
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
