Codes in R