A Real newbie to R environment, I am going through the book "Introduction to R".
There, in an example, author suggests that "
Shorter vectors in the expression are recycled as often as need be (perhaps fractionally) until they match the length of the longest vector.
Immediately after that, there is this example... wherein it suggests that a vector would be repeated 2.2 times...
However, when I replicated the same example on my system (ubuntu 64b, R - v2.4.11), I got this error message
x
[1] 2 5 8 6 11
> y
[1] 23 11
> v=2*x+y+1
Warning message:
In 2 * x + y :
longer object length is not a multiple of shorter object length
> v
[1] 28 22 40 24 46
Tried searching through google, stackoverflow internally as well, but couldnt find anything satisfactory... Am I missing something here ? is there something with the version of R I am using ?