Hi L.A.,

Use the package 'hwriter' to produce HTML pages/objects.

> library(hwriter)
> hwrite(srtype, page="c:/R/reports/myreport1.html")

'hwrite' can be combined with the function 'format' (to manage number format, digits, decimal places, etc...) and supports advanced HTML/CSS formatting options.

Best regards,

Greg
---
Gregoire Pau
EMBL Research Officer
http://www.ebi.ac.uk/~gpau/


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:
 How do I get R2HTML to produce the same number format?
Particularly remove the decimal places for Par and Sal.
  Are there better methods to produce this type of report?
Thanks,
L.A.
 R version 2.10.0 XP

srtype<-cbind(Par,Sal,Median,COD,PRD,LowerCI,UpperCI)
srtype

                     Par   Sal    Median   COD   PRD LowerCI UpperCI
RES I             9683   578   0.9533  29.69 1.191  0.9382  0.9582
RES V            4003   155   0.9763  16.51 1.091  0.9499  0.9943
OTHER           1542    10    0.8367  82.35 1.253  0.4759  2.2293
COM I            1711    26    0.9521  26.01 1.102  0.7811  0.9789
COM                   9     1    0.9313    0.00 1.000  0.0000  0.0000


library(R2HTML)
HTMLStart(outdir="c:/R/reports", file="myreport1",
   extension="html", echo=FALSE, HTMLframe=TRUE)
HTML(srtype)
HTMLhr()
HTMLStop()

Par Sal Median COD PRD LowerCI UpperCI RES I 9683.00 578.00 0.95 29.69 1.19 0.94 0.96 RES V 4003.00 155.00 0.98 16.51 1.09 0.95 0.99 OTHER 1542.00 10.00 0.84 82.35 1.25 0.48 2.23 COM I 1711.00 26.00 0.95 26.01 1.10 0.78 0.98 COM V 9.00 1.00 0.93 0.00 1.00 0.00 0.00


______________________________________________
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