Fixing bugs in analysis.R.
Merge branch 'master' of https://github.com/mortonjt/SCOPE