R script to create init.cdf file