Updated R program file