Collection of codes in R