Skip to content
Prev 310278 / 398506 Next

sweave xtable and driver RweaveHTML

You can certainly generate an HTML table, but how about the rest of
your Snw document? How are you going to convert them to HTML? I mean
otherwise you get something like this which is not a valid HTML
document:

\documentclass{article}
\begin{document}
<TABLE border=1>
<TR> <TH>  </TH> <TH> Sepal.Length </TH> <TH> Sepal.Width </TH> <TH>
Petal.Length </TH> <TH> Petal.Width </TH> <TH> Species </TH>  </TR>
  <TR> <TD align="right"> 1 </TD> <TD align="right"> 5.10 </TD> <TD
align="right"> 3.50 </TD> <TD align="right"> 1.40 </TD> <TD
align="right"> 0.20 </TD> <TD> setosa </TD> </TR>
  <TR> <TD align="right"> 2 </TD> <TD align="right"> 4.90 </TD> <TD
align="right"> 3.00 </TD> <TD align="right"> 1.40 </TD> <TD
align="right"> 0.20 </TD> <TD> setosa </TD> </TR>
   </TABLE>
\end{document}


It is not easy to write a document for both LaTeX and HTML, although
the R output can be easily converted to either LaTeX or HTML.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Thu, Nov 8, 2012 at 4:29 AM, Witold E Wolski <wewolski at gmail.com> wrote: