Code created while reading the Learning R book