For example, I have a dataset of 30-years air temperature of a city, the dataset looks like:
Year Julian_date temperature
1991 1 2.1
1991 2 2.2
... ... ...
1991 365 2.3
1992 1 2.1
... ... ...
1992 365 2.5
... ... ...
2020 366 2.5
I would like to calculate the 90th percentile value of each Julian date (from different years), and returen the results, like:
Julian_date value(the 90th percentile)
1 2.4
2 2.6
... ...
365 2.5
How should I write the code in r?