R2HTML Report number format, or Better Way?
L.A. wrote:
Here I am again with question I'll feel foolish for asking, when I see the answer. I'm trying to produce a report and here's where I get stuck: srtype<-cbind(Par,Sal,Median,COD,PRD,LowerCI,UpperCI) srtype
Chances are better to get a reply when you supply the data as code as in the example below Maybe Eric Lecoutre could have a look at it. Dieter srtype=data.frame(Par=as.numeric(1000:1005), Sal=as.numeric(1:6),Median=rnorm(6)) srtypeM = as.matrix(srtype) library(R2HTML) HTMLStart(outdir="c:/tmp", file="myreport1", extension="html", echo=FALSE, HTMLframe=TRUE) # Use a data frame: will make column-wise decisions HTML(srtype) # When you have a matrix... HTML(srtypeM) # ... using the format arguments should work, but.... # I think this might be a bug, because only the first # in the vector is used. HTML(srtypeM,nsmall=c(1,5,7),digits=c(2,9,10)) # Same happens in the examples on the doc page HTML(iris[1:2,1:2],nsmall=c(2,5)) HTMLhr() HTMLStop()
View this message in context: http://n4.nabble.com/R2HTML-Report-number-format-or-Better-Way-tp997787p997914.html Sent from the R help mailing list archive at Nabble.com.