hi, I want html code via the xtable package. I have a data.frame and tried to use the print()-function. But I only get the data.frame printed - no html arround it. what do I have to change? thanks!
On Sep 20, 2009, at 6:40 PM, Martin Batholdy wrote:> hi, > > I want html code via the xtable package. > > I have a data.frame and tried to use the print()-function. > But I only get the data.frame printed - no html arround it. > > > what do I have to change?That, my son, is extremely hard to tell since knowing what you _have_ done would require superhuman powers (or I suppose extreme hacking.) This seems to "work" on a simple dataframe that is just lying around: > print(xtable(x), type="html") <!-- html table generated in R 2.9.2 by xtable 1.5-5 package --> <!-- Sun Sep 20 19:17:53 2009 --> <TABLE border=1> <TR> <TH> </TH> <TH> a </TH> <TH> b </TH> <TH> c </TH> </TR> <TR> <TD align="right"> 1 </TD> <TD align="right"> 1.00 </TD> <TD align="right"> 2.00 </TD> <TD align="right"> 3.00 </TD> </TR> <TR> <TD align="right"> 2 </TD> <TD align="right"> 1.00 </TD> <TD align="right"> 2.00 </TD> <TD align="right"> 3.00 </TD> </TR> </TABLE>> > > > thanks! > > ______________________________________________ > R-help at 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.David Winsemius, MD Heritage Laboratories West Hartford, CT
Hi, I'm trying put in same page: - a data frame with 3 columns and 45 lines; - a box plot; the code is: require(hwriter) hwrite(t1000[,c(1,5,6)], 'T1000.html', bgcolor='#ffdc98', row.bgcolor='#ffdc98', br=TRUE) p = openPage('T1000.html') hwriteImage('caixa.jpg', p, br=TRUE) hwrite('',p, br=TRUE) closePage(p) but isn't working. What's wrong? Thanks, -------------------------------------- Silvano Cesar da Costa Departamento de Estat?stica Universidade Estadual de Londrina Fone: 3371-4346