update R file