Using R to do some funny things