R-script for project