我想獲取頻率值上的分位數。 例如,假設我有數據,如下列:頻率值上的R分位數
length frequency 1 13 # There are 13 length 1 items. 2 20 # There are 20 length 2 items. 8 17 10 25 ... [10000+ more entries in file]
所以我想獲得位數爲特定值像0.05,0.10,0.50,0.90,0.95,0.99。另外,我想獲得一定長度的等級。 我如何在R或Python上做到這一點?