[R] trouble with html() in Hmisc

Liviu Andronic landronimirc at gmail.com
Sat Oct 3 19:49:02 CEST 2009


On 10/3/09, Mark Difford <mark_difford at yahoo.co.uk> wrote:
> This has nothing to do with Hmisc or hevea.
Although I have LyX installed, I don't quite understand where LyX
comes into play. The R code in the original e-mail takes a table-like
object and transforms it into LaTeX; then html() calls hevea to conver
.tex to .html and opens a browser to display the result.

>  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
>  %% Because html converters don't know tabularnewline
>  \providecommand{\tabularnewline}{\\}

If I print the `latex' object from the previous e-mail, I get the
offending "tabularnewline".
> data(Angell)
> .object <- cor(Angell[,1:2], use="complete.obs")
> tmp <- latex(.object, cdec=c(2,2), file="", title="")
% latex.default(.object, cdec = c(2, 2), file = "", title = "")
moral&$ 1.00$&$-0.59$\tabularnewline
hetero&$-0.59$&$ 1.00$\tabularnewline



Does this mean that Hmisc produces LyX code (as opposed to LaTeX code)?

More information about the R-help mailing list