create r code