When you perform a boolean comparison between two vectors in R, the "expectation" is that both vectors are of the same length, so that R can compare each corresponding element in turn.
R has a much loved (or hated) feature called recycling, whereby in many circumstances if you try to do something where R would normally expect objects to be of the same length, it will automatically extend, or recycle, the shorter object to force both objects to be of the same length.
If the longer object is a multiple of the shorter, this amounts to simply repeating the shorter object several times. Oftentimes R programmers will take advantage of this to do things more compactly and with less typing.
But if they are not multiples, R will worry that you may have made a mistake, and perhaps didn't mean to perform that comparison, hence the warning.
Explore yourself with the following code:
> x <- 1:3
> y <- c(1,2,4)
> x == y
[1] TRUE TRUE FALSE
> y1 <- c(y,y)
> x == y1
[1] TRUE TRUE FALSE TRUE TRUE FALSE
> y2 <- c(y,2)
> x == y2
[1] TRUE TRUE FALSE FALSE
Warning message:
In x == y2 :
longer object length is not a multiple of shorter object length