R scripts for CPTP harmonization project