refactor R script for massive optimization; update README. refactor changes order of activity output to numeric by level code rather than alphabetical as in older, less efficient version