Background
In my memory, `sapply` is a function that takes a vector to consume and returns another vector as result. Today I am sharing a “bizarre” behavior of it. Later I will talk about the reason to account for this weird behavior.
Details
Let’s first look at the following line, from which I scratched my head:
sapply(1:30, function(x) {if(x>15) 1})