added R file and updated notebook