1 year ago

#383526

test-img

Junyang Guo

What is a more efficient way to calculate cumulative quantile than cumquant?

I'm trying to calculate the cumulative quantile (10 percentile, 25 percentile, etc.) over a column in a large dataset (over 10 million).

I tried to use the function cumquant from the cumstats package but it takes long (longer than an hour; a toy test shows that it takes more than 40 seconds to obtain results for a vector with 100,000 values (e.g. cumquant(1:100000,p=0.1)).

Is there a more efficient way to calculate it using data.table (or others)?

r

datatable

cumulative-sum

quantile

0 Answers

Your Answer

Accepted video resources