Create calPurity.R