[R] grep() exclude certain patterns?

Greg Snow Greg.Snow at imail.org
Wed Dec 9 19:19:09 CET 2009


I think that we are talking past each other here.  You are clearly not understanding (or at least convinced by) what I am saying, and you are not convincing me (or possibly I am not understanding your arguments).  So our efforts will probably be better spent on things other than continuing this discussion.  After a few general comments on why I like where R is and the direction it is going, this is likely to be my last contribution to this conversation.

You have expressed interest in books in the past, as the free documentation has not been sufficient for you, you may be interested in some of the books listed here: http://www.r-project.org/doc/bib/R-books.html

Some that may fit your needs (others may as well, but I have not read everything on the list) include:
S Programming
An R and S-Plus Companion to Applied Regression
Modern Applied Statistics with S
A Handbook of Statistical Analyses Using R  (this one has the 1st chapter and all example available for free).


You say that R is written by statisticians rather than software engineers.  10 years ago I was in the last year of my graduate program and my job at the time had me traveling and interacting with a lot of people who had purchased and were using the same commercial package as I was.  These were both stats professors and professional statisticians.  Some of the discussions were about some added functionality that we wished for.  When I tried to pass these suggestions on to one of the programmers (CS graduate) of the commercial package, he proceeded to give me a lecture on what the users really wanted.

I'll take the package created by Statisticians for Statistician over the ones by Software Engineers who don't work in the field.

You compared R to C++ a couple of times, but this is not really a valid comparison.  C++ was never intended to be used interactively, S/R had this as a core concept from the beginning.  As a slightly better comparison, one previous job that I had I was working with programs written in C, when I switched to using Perl (another language famous for and proud of nonstandard function calls and inconsistencies) my productivity doubled.  This is not saying that C is bad, I still use it where appropriate, just that Perl was better for that job.  I can see how someone could program a t-test in C++, but R would be a lot quicker, on the other hand, I would not choose R as the programming language if I were creating the a full accounting system, the next word processor, and improved spreadsheet, or the next hot game (though I am guilty of programming games in R).

R is not perfect, if it were, there would not be all the new releases.  But I am happy with it and the direction it is going.  You would like more structure, more standards committees, etc.  Here is one example of why I don't like the idea of those things.  A couple of years ago I posted to this list with a question about something I was trying to do, I included an example of what I had tried, what I was trying to accomplish, and how the results differed from what I wanted.  My post appeared on Friday.  On Saturday a member of R core responded that the functions I was using were never intended to work the way that I was trying to make them work, and it was unlikely that I would ever get them to work that way.  He did however mention that he could see a possibility of a new function that did what I wanted.  On Sunday another person replied and said they would also be interested in the new function.  On Monday, the member of R core wrote again saying that he had just committed the new function, which did exactly what I asked for, to the development version of R.  Contrast that with the last time I contacted tech support for a commercial package that I was paying maintenance fees for, it took them longer than that to get back to me with their first answer, which did not even work, and even longer to get back with a working answer that turned out to be more complicated than what I had worked out for myself in the meantime.

So, I for one am very happy with R and the direction it is going.  I am grateful to R core and all the others who are improving this great program.  And I am trying to do my part in improving it.  

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111




More information about the R-help mailing list