R codes for r art book