I'm mindful of the volunteer nature of R-core, but I'm also sympathetic to
Donald.

I use Sweave to create documents, though I tend to view Sweave as a
typesetter, not a report writer.  What do I see as the difference? Sweave
typesets _raw_ R output.  A report writer makes it easier to quickly grasp
the key points.  For example, floating-point output is a poor choice for
reports to management and I have been experimenting with something I call
"lucid" printing.  Here are two examples that show how standard floating
point can make simple question needlessly hard to answer:

Question 1:   How do the coefficients compare in size? How large is the
intercept?

R> print(df1)
                   effect
hyb_A       -1.350000e+01
hyb_B        4.500000e+00
hyb_C        2.450000e+01
hyb_C1       6.927792e-14
hyb_C2      -1.750000e+00
hyb_D        1.650000e+01
(Intercept)  1.135000e+02

R> lucid(df1)
            effect
hyb_A       -13.5
hyb_B         4.5
hyb_C        24.5
hyb_C1        0
hyb_C2       -1.75
hyb_D        16.5
(Intercept) 113.5

Question 2: Which are the smallest / largest / significant variance
components?

R> print(df2)
      effect component std.error   z.ratio constraint
1        hyb  1.09e+01  4.40e+00  2.471607    Postive
2       mlra  2.77e+02  1.66e+02  1.669316    Postive
3   mlra:loc  4.93e+02  2.61e+01 18.899825    Postive
4   hyb:mlra  1.30e-04  1.58e-06 82.242618   Boundary
5         yr  1.26e+02  1.19e+02  1.060751    Postive
6     hyb:yr  2.23e+01  4.50e+00  4.951793    Postive
7    mlra:yr  4.81e+02  1.08e+02  4.442904    Postive
8 R!variance  2.68e+02  3.25e+00 82.242618    Postive

R> lucid(df2)
      effect component std.error z.ratio constraint
1        hyb   10.9         4.4    2.472    Postive
2       mlra  277         166      1.669    Postive
3   mlra:loc  493          26.1   18.9      Postive
4   hyb:mlra    0.0001      0     82.24    Boundary
5         yr  126         119      1.061    Postive
6     hyb:yr   22.3         4.5    4.952    Postive
7    mlra:yr  481         108      4.443    Postive
8 R!variance  268           3.25  82.24     Postive

The (beta) code:

lucid <- function(x, dig=4, ...) UseMethod("lucid")

lucid.default <- function(x, dig=4, ...) { x } # do nothing for non-numeric

lucid.numeric <- function(x, dig=4, ...) {
  # Use 4 significant digits, drop trailing zero, align decimals
  if(class(x)=="numeric" | class(x)=="integer")
    format(format(signif(zapsmall(x), dig), scientific=FALSE,
                  drop0trailing=TRUE))
  else x
}

lucid.data.frame <- function(x, dig=4, quote=FALSE, ...){
  x[] <- lapply(x, lucid, dig)
  print(x, quote=quote)
  invisible(x)
}


Kevin Wright


On Sun, Aug 22, 2010 at 2:43 AM, David Hajage <dhajag...@gmail.com> wrote:

> 2010/8/21 Donald Winston <satchwins...@yahoo.com>
>
> > I know how to program in a dozen languages. I have a B.A. in mathematics,
> > and an M.S. in operations research and statistics.
>
>
> I just don't care, I would try to answer you even if you had no formation.
>
>
> > I can figure out how to write reports in R. The point is I don't want to.
> > There should be a function that generates a report just like there is a
> > function that generates a plot without using loops or if statements.
>
>
> The question is: what do you want? What is the result of this fictive
> function? I am sure you don't need loop to do that.
>
>
> > I've read "R IN A NUTSHELL" from cover to cover. The word "report" does
> not
> > even appear in the index.
> >
>
> Just ask Joseph Adler.
>
>
> >
> > On Aug 21, 2010, at 11:39 AM, David Hajage wrote:
> >
> > > I must repeat: "just show us what is the kind of report you want to
> > > do, and you will perhaps
> > > get a solution to reproduce it"
> > > We still don't know what is the output of your report() function.
> > > This, is ridiculous.
> > >
> > > On Saturday, August 21, 2010, Frank Harrell <f.harr...@vanderbilt.edu>
> > wrote:
> > >>
> > >>
> > >> On Sat, 21 Aug 2010, Donald Paul Winston wrote:
> > >>
> > >>
> > >>
> > >> Good grief. Adding a report function is not going to make R less
> > flexible. Don't
> > >> you want to use a tool that's relevant to the rest of the world? That
> > world is
> > >> much bigger then your world. This is ridiculous.
> > >>
> > >> Looks like some people are complaining about me criticizing R and the
> > people who
> > >> defend it. Good grief again.
> > >>
> > >>
> > >> I think your philosophy is now more clear Donald.  People who don't
> like
> > learning new things place themselves at a competitive disadvantage. The R
> > community, where learning is highly valued, may be fundamentally
> > incompatible with your philosophy.  You may do well to stay with SAS.
> > >>
> > >> Frank
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> ________________________________
> > >> From: David Hajage-2 [via R] <
> > ml-node+2333348-1227050197-138...@n4.nabble.com<ml-node%2b2333348-1227050197-138...@n4.nabble.com>
> <ml-node%2b2333348-1227050197-138...@n4.nabble.com<ml-node%252b2333348-1227050197-138...@n4.nabble.com>
> >
> > >
> > >>
> > >> Sent: Sat, August 21, 2010 4:54:12 AM
> > >> Subject: Re: R reports
> > >>
> > >> Just show us what is the kind of report you want to do, and you will
> > perhaps
> > >> get a solution to reproduce it. Then, if you don't like the way to do
> > that,
> > >> write your own code or don't use R, noone force you. The majority of R
> > users
> > >> are satisfied with the way to generate reports, because it is
> flexible.
> > >> There is ABSOLUTELY *NO WARRANTY with R, this means also you have no
> > >> warranty to find exactly what you want, and what you can find in SAS.
> > Just
> > >> deal with it.*
> > >>
> > >> 2010/8/21 Donald Paul Winston <[hidden email]>
> > >>
> > >>
> > >>
> > >>
> > >> Sweave and LaTex is way to much overhead to deal with. There should be
> a
> > >> built in standard report() function analogous to plot().
> > >>
> > >> Something like the following is necessary if you want real people to
> > take R
> > >> seriously:
> > >>
> > >> report(data=<aDataFrame>, vars=<vectorOfColumnNames>,
> > >> label=<vectorOfColumnNames>, by=<vectorOfColumnNames>,
> > >> sum=vectorOfColumnNames>, title=<vectorOfStrings>,
> > >> footer=<vectorOfStrings>,
> > >> pageBy=<vectorOfColumnNames>, sumBy=<vectorOfColumnNames>,
> > >> filename=<string>, fileType=<text|csv|pdf..>...etc)
> > >>
> > >> Did I say "real" people?  I've been Palinized.
> > >> --
> > >> View this message in context:
> > >>
> > http://r.789695.n4.nabble.com/R-reports-tp2330733p2333264.html?by-user=t
> > >> Sent from the R help mailing list archive at Nabble.com.
> > >>
> > >>
> > >> ______________________________________________
> > >> R-help@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.
> > >>
> >
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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.
>



-- 
Kevin Wright

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to