Update rankall.R

Created processOutcome method to remove duplicate code