Recycling can be used in a clever way to simplify code.
Subsetting
If we want to keep every third element of a vector we can do the following:
my_vec <- c(1,2,3,4,5,6,7,8,9,10)
my_vec[c(TRUE, FALSE)]
[1] 1 3 5 7 9
Here the logical expression was expanded to the length of the vector.
We can also perform comparisons using recycling:
my_vec <- c("foo", "bar", "soap", "mix")
my_vec == "bar"
[1] FALSE TRUE FALSE FALSE
Here "bar" gets recycled.