Edited R file