Getting to grips with basic workings of R