R: refactorPredictions documentation and bug fixes.