Code in R