R Code for Data Toolkit