Exercism problems in R