[R] Median computation

peter dalgaard pdalgd at gmail.com
Wed May 23 19:54:08 CEST 2012


On May 23, 2012, at 19:30 , Preeti wrote:

> Hmm.. that is interesting... I did this on our server machine which has
> about 200 cores. So memory is not an issue. Also, building the dataframe
> takes about a few minutes maximum for me. My code is similar to yours but
> for the fact that I create my dataframe from read.delim("filename") and
> then I drop the first column because it has characters. I don't know why it
> takes long on my machine.

Are you sure that you actually have any columns with the same name then? You need read.delim(......, check.names=FALSE), otherwise you just get an expensive identity operation. 

Also, you should probably try running Benno's exact code, just for comparison. Some of those multicore machine are really rather slow if you only use one core for your process. 

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list