Improve calculation of R-factor.  Refs #6747.
Merge branch 'feature/6747_improve_mc' into develop