Re: [R] Is it possible to create highly customized report in *.xlsformat by using R/S+?

From: Whit Armstrong <>
Date: Thu 21 Jul 2005 - 01:27:29 EST

I have a package which I use to create excel files from R.

I have not been able to produce a configure script general enough for me to post it to cran, but I will send it to you if you like.

I use it for production jobs on our linux servers. You may have to tinker a bit to get it to compile on windows.

Have a look at the examples below. If it suits your needs, I will send it to you.


Here are the examples from the help page:

     nc <- 4
     nr <- 20
     x <- matrix(rnorm(nc*nr),ncol=nc,nrow=nr)

     rownames(x) <- rep(letters,length=nr)
     colnames(x) <- rep(letters,length=nc)

     # write a matrix

write.xls(x,"","matrix",writeColNms=FALSE,writeRowNms=F ALSE)      # add some formats  


write.xls(x,"matrixFromR_formatted2.xls","matrix",formats=rep(c("0.0","0 "),nc/2))  

write.xls(x,"matrixFromR_formatted3.xls","matrix",formats=rep("#,##0.0;[ Red]#-##0.0;\"\"",nc))




write.xls(x[,1],"","vector",writeColNms=FALSE,writ eRowNms=FALSE)

     # char data test
     y <- matrix(rep(letters,each=26),ncol=26)
     rownames(y) <- rep(letters,length=26)
     colnames(y) <- rep(letters,length=26)

     # logical data test
     z <- matrix(as.logical(round(runif(nc*nr),0)),ncol=nc)
     rownames(z) <- rep(letters,length=nr)
     colnames(z) <- rep(letters,length=nc)


-----Original Message-----
[] On Behalf Of Wensui Liu Sent: Wednesday, July 20, 2005 10:56 AM
To: Greg Snow
Subject: Re: [R] Is it possible to create highly customized report in *.xlsformat by using R/S+?

I appreciate your reply and understand your point completely. But at times we can't change the rule, the only choice is to follow the rule. Most deliverables in my work are in excel format.

On 7/20/05, Greg Snow <> wrote:
> See:
> and
> Greg Snow, Ph.D.
> Statistical Data Center, LDS Hospital
> Intermountain Health Care
> (801) 408-8111
> >>> Wensui Liu <> 07/19/05 03:22PM >>>
> I remember in one slide of Prof. Ripley's presentation overhead, he
> said the most popular data analysis software is excel.
> So is there any resource or tutorial on this topic?
> Thank you so much!
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

WenSui Liu, MS MA
Senior Decision Support Analyst
Division of Health Policy and Clinical Effectiveness Cincinnati Children
Hospital Medical Center

______________________________________________ mailing list
PLEASE do read the posting guide!

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Thu Jul 21 01:40:30 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:53 EST