[R] anti-R vitriol

TEMPL Matthias Matthias.Templ at statistik.gv.at
Wed Jun 30 09:34:49 CEST 2004


Hi,

I wonder, why SAS should be better in time for reading a data in the system.
I have an example, that shows that R is (sometimes?, always?) faster.

-----------------
Data with 14432 observations and 120 variables.
Time for reading the data:

SAS 8e:
data testt;
set l1.lse01;run;

     	real time           1.46 seconds
      cpu time            0.18 seconds

R 1.9.0:
system.time(read.table("lse01.txt",header=T"))
[1] 0.63 0.06 6.22   NA   NA

----------------
And this is 2.5 times faster as SAS. 
(SAS reads the .sas7bdat and R the .txt file)

I´m working with SAS (I should working with SAS) and R (I'm going to work with R) on the same Computer. In my examples about time series and in something simple but also time consuming procedures like summaries,... R is always 2 times faster and sometimes 30 times faster (with the same results).
I think R is a great software and you can do more things as in SAS.
Some new developments in SAS 9, like COM-server to Excel, some new procedures, better graphs, ... is developed and implemented in R for many years ago.
Thanks to the R Development Team!!!

Matthias

> -----Ursprüngliche Nachricht-----
> Von: Liaw, Andy [mailto:andy_liaw at merck.com] 
> Gesendet: Dienstag, 29. Juni 2004 20:21
> An: 'Barry Rowlingson'; R-help
> Betreff: RE: [R] anti-R vitriol
> 
> 
> > From: Barry Rowlingson
> > 
> > A colleague is receiving some data from another person. That person
> > reads the data in SAS and it takes 30s and uses 64k RAM. 
> That person 
> > then tries to read the data in R and it takes 10 minutes and uses a 
> > gigabyte of RAM. Person then goes on to say:
> > 
> >    It's not that I think SAS is such great software,
> >    it's not.  But I really hate badly designed
> >    software.  R is designed by committee.  Worse,
> >    it's designed by a committee of statisticians.
> >    They tend to confuse numerical analysis with
> >    computer science and don't have any idea about
> >    software development at all.  The result is R.
> > 
> >    I do hope [your colleague] won't have to waste time doing
> >    [this analysis] in an outdated and poorly designed piece
> >    of software like R.
> > 
> > Would any of the "committee" like to respond to this? Or
> > shall we just 
> > slap our collective forehead and wonder how someone could get 
> > such a view?
> > 
> > Barry
>  
> 
> My $0.02:
> 
> R, being a flexible programming language, has an amazing 
> ability to cope with people's laziness/ignorance/inelegance, 
> but it comes at a (sometimes
> hefty) price.  While there is no specifics on the situation 
> leading to the person's comments, here's one (not as extreme) 
> example that I happen to come across today:
> 
> > system.time(spam <- read.table("data_dmc2003_train.txt",
> +                                 header=T, 
> +                                 colClasses=c(rep("numeric", 833), 
> +                                              "character")))
> [1] 15.92  0.09 16.80    NA    NA
> > system.time(spam <- read.table("data_dmc2003_train.txt", header=T))
> [1] 187.29   0.60 200.19     NA     NA
> 
> My SAS ability is rather serverely limited, but AFAIK, one 
> needs to specify _all_ variables to be read into a dataset in 
> order to read in the data in SAS.  If one has that 
> information, R can be very efficient as well.  Without that 
> information, one gets nothing in SAS, or just let R does the 
> hard work.
> 
> Best,
> Andy
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
> PLEASE 
> do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list