R script and manuscript edits - work in progress