Updated R files