yihui / printr

Some (magical) printing methods for knitr
https://yihui.org/printr/
118 stars 24 forks source link

add method for summary.lm ($coef) #14

Open bquast opened 8 years ago

bquast commented 8 years ago

There is still a slight problem in that it prints

Pr(>|t|)

as:

Pr(¿—t—)

in LaTeX documents

bquast commented 8 years ago
library(printr)
lm(speed ~ dist, data=cars)
            Estimate   Std. Error    t value   Pr(>|t|)

(Intercept) 8.2839056 0.8743845 9.473985 0 dist 0.1655676 0.0174945 9.463990 0

Note that it's GFM that doesn't render this table well, it works fine in R

yihui commented 8 years ago

For the LaTeX problem, did you have \usepackage[T1]{fontenc} in the preamble?

bquast commented 8 years ago

I'm using LyX which I'm quite sure does this when rendering using pdflatex, it also occurs when using LuaTeX.

This may be related, when I produce a kable in an ERT in standard text it always works fine, but the if the first number is negative (i.e. coefficient of the intercept) and I embed it in a table float, in fails to render.