Adding comparison intervals R code