added R script to create chronic column in wide format