added R codes and PNG figures for Project1