Fixed bug in analysis.R.