hmisc::latex tables open in external xdvik window

2019-07-25 17:24发布

Since our update to R2.15.1, the tables in my lyx documents that result from calls to the latex function (package Hmisc) open in an external xdvik-window instead of being inserted in the pdf-document that I am compiling. On the contrary, the tables produced with xtable and the graphs produced with ggplot do appear where they belong in the document.

The chunk header for the latex call is

<<Specs,tidy=F,results='asis',eval=F>>=

and the chunk is then referred to multiple times with e.g.

<<AGESpecs,ref.label='Specs',tidy=F,results='asis',echo=F>>=

The tables in the xdvik window do look perfect. Any ideas?

1条回答
你好瞎i
2楼-- · 2019-07-25 17:49

It looks I have to guess from experience since the chunk body was not shown here, and my best guess is you need an argument file='' in the function latex(), i.e.

library(Hmisc)
latex(object, file = '')

By default, latex() writes the object in a tex file, and compiles it to dvi. That is probably why you saw the xdvik window.

查看更多
登录 后发表回答