update .R file