hmisc::latex tables open in external xdvik window instead of being inserted into the pdf output document

纵饮孤独 提交于 2019-12-11 12:46:46

问题


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:


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.



来源:https://stackoverflow.com/questions/12141999/hmisclatex-tables-open-in-external-xdvik-window-instead-of-being-inserted-into

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!