Practical steps in R coding