plots and R codes for project