You may have seen the memes going around about fun ways to program the straightforward function isEven() which returns TRUE if the input is even, and FALSE otherwise. I had a play with this and it turned into enough for a blog post, and a nice walk through some features of R. The ‘traditional’ way to check if an integer is even is to check if it is divisible by 2. This can be achieved with the modulo operator %% which gives the remainder after dividing by another number. For example, 5 mo...