Fixed small bug in analysis.R.