Fixed errors on rate trace R.

When running the R scripts, I ran into errors that have now been fixed.

Cheers.