[R] Fastest way to calculate quantile in large data.table

2015-02-05 Thread Camilo Mora
In total I found 8 different way to calculate quantile in very a large data.table. I share below their performances for future reference. Tests 1, 7 and 8 were the fastest I found. Best, Camilo library(data.table) v - data.table(x=runif(1),x2 = runif(1),

Re: [R] Fastest way to calculate quantile in large data.table

2015-02-05 Thread Steve Lianoglou
Not sure if there is a question in here somewhere? But if I can point out an observation: if you are doing summary calculations across the rows like this, my guess is that using a data.table (data.frame) structure for that will really bite you, because this operation on a data.table/data.frame is

[R] Fastest way to calculate quantile in large data.table

2015-02-04 Thread Camilo Mora
Hi everyone, I have a data.table with 200 columns and few million rows and am trying to calculate the .1 and .9 quantiles for each row across all 200 columns. I have found different ways to do this, all with different performances. The examples I used are below. I wonder whether there is a