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.
...