[r] Calculating percentile of dataset column