R code for: "Distributed lag non-linear models"