R codes for the .cvs files