Important changes in main R script

Added dimethyl support