Appendix 1. R scripts related to the analyses conducted as part of this study [R document]