[Rd] Another wishlist for R
Warnes, Gregory R
gregory_r_warnes at groton.pfizer.com
Wed Jan 21 00:04:39 MET 2004
> 1. Add "head" and "tail" to R base.
> Patrick Burns has these:
> http://www.burns-stat.com/pages/public.html#genutil
> Very handy functions for checking data manipulation.
How about we just add these to a package available on CRAN? How about we
just make a package of the Burns Statistics functions? There are already
.Rd files...
> 4. Increased integration of text and graphics output (for
> PDF, in particular).
> Sweave is fantastic for quality reporting, but can be a lot of work
> when a quick analysis is all that is needed.
> Often I would like to do something like print a box plot
> and include an
> anova table, for example:
> pdf("file")
> boxplot(y~x)
> frame()
> sink.to.pdf()
> frame()
> anova(lm(y~x))
> sink()
> dev.off()
> I know of no such (simple) tools. Ben Bolker has a an idea here:
> http://maths.newcastle.edu.au/~rking/R/help/02b/4179.html
In gregmisc I have a function textplot which does much of what you want, and
I've just added (in CRAN incoming now) a new function sinkplot() which
accomplishes exactly what you've asked for. Here is the example:
set.seed(12456)
x <- factor(sample( LETTERS[1:5], 50, replace=T))
y <- rnorm(50, mean=as.numeric(x), sd=1)
par(mfrow=c(1,2))
boxplot(y~x, col="darkgreen")
sinkplot()
anova(lm(y~x))
sinkplot("plot",col="darkgreen")
The only thing that isn't quite right is the default R font is
proportionally spaced so the matrix columns don't line up right. I'll need
change the default font. [Are any of the Hershey fonts fixed width?]
-Greg
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
More information about the R-devel
mailing list