0

I have a data frame with approximately 100 measurements (rows) per day and I want to create a new data frame with one row for each day and the column will be the 90th percentile of the data for that day. I have figured out how to use the aggregrate() function for calculating the mean value of each day but the "FUN=" parameter doesn't use the quantile function so I can't use aggregate() for calculating quantiles. If I need to use some sort of loop it would be helpful to see an example.

  • It would be easier to help if you create a small reproducible example along with expected output. Read about [how to give a reproducible example](http://stackoverflow.com/questions/5963269). – Ronak Shah Mar 20 '21 at 01:24
  • See https://stackoverflow.com/q/11562656/3358272, and anywhere they say `mean`, you can turn into something like `function (z) quantile(z, 0.9)` – r2evans Mar 20 '21 at 01:45

0 Answers0