[R] R reports

Greg Snow Greg.Snow at imail.org
Thu Aug 19 19:22:29 CEST 2010


Your question brings up a bit of a philosophical issue (or possibly economic theory).  The idea is the contrast between specialization and generalization.  A purely specialized program will only do one thing (but hopefully do that one thing well), the ultimate generalized program will do everything (but usually none of the things very well, have you ever tried eating with one of those pocket knives that has a built in fork and spoon?)  most fall somewhere in between on the specialization/generalization continuum.

So when someone wants to do something that is not currently done in a program the question is: "Do we make the program more general by adding this capability? Or do we delegate that task to another program that already specializes in that?".  The answer will be different for different programs/programmers/users/...

What you detail below as the benefits of SAS proc report actually includes several tasks.  Tasks that statistical programs do well like grouping and summarizing of data should be in the stats program.  In the case of R there are multiple ways, but I would suggest you look at the reshape and plyr packages which make a lot of this easy (while still giving more power than SAS proc report).

Then there is the display of the data and/or summaries.  R does have the basic print capabilities, but if you want more control and extras like headers/footers, titles, etc. then this is better done by delegating those jobs to more specialized programs (LaTeX, HTML, OpenOffice, MSWord, etc.), R has interfaces to many of these to make that delegation easy (and the results end up looking much nicer than SAS proc report).

If that is not sufficient for your needs then you can either create your own package that does what you want, contribute to other efforts, or motivate someone else to do this for you.

Personally I have not used SAS proc report for quite a while, so I did a quick internet search and found a quick tutorial with examples (of both input and output).  The main result was a good reminder of why I don't use SAS proc report any more and why I do use R and the other specialized programs that it interfaces with.

Hope this helps (or at least provokes thought),

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


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Donald Paul Winston
> Sent: Thursday, August 19, 2010 5:43 AM
> To: r-help at r-project.org
> Subject: Re: [R] R reports
> 
> 
> Oops, I meant 4GL. Part of SAS involves more or less "declarative"
> coding
> where SAS figures out how to process the information and you don't have
> to.
> Sweave and html generators in R are not what I'm looking for. I'm
> looking
> for a function whose arguments are data, column names, grouping
> variables,
> summary stats, titles, footnotes, etc. Sort of like what plot does
> except
> the function will generate a report. I suppose you could specify an
> output
> format or "printer device" as plain text, rich text, pdf, or html.
> --
> View this message in context: http://r.789695.n4.nabble.com/R-reports-
> tp2330733p2331037.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list