How to find top n% of records in a column of a dataframe using R
问题 I have a dataset showing the exchange rate of the Australian Dollar versus the US dollar once a day over a period of about 20 years. I have the data in a data frame, with the first column being the date, and the second column being the exchange rate. Here's a sample from the data: >data V1 V2 1 12/12/1983 0.9175 2 13/12/1983 0.9010 3 14/12/1983 0.9000 4 15/12/1983 0.8978 5 16/12/1983 0.8928 6 19/12/1983 0.8770 7 20/12/1983 0.8795 8 21/12/1983 0.8905 9 22/12/1983 0.9005 10 23/12/1983 0.9005