Update trialAvg.R