Manuscript1 Analysis scripts in R