Update three R files