R program and test run