Collection of R codes