Added an R file for utility functions.