My R codes