[R] [Hmisc] Latex to pdf

Jeroen Ooms j.c.l.ooms at uu.nl
Sun Sep 6 13:49:08 CEST 2009


I would like to print some tables and figures to a PDF device on a CentOS 5
vps. However, I cannot seem to get the latex function from Hmisc working. I
followed the example, and got an error: sh: xdvi: command not found. I tried
installing the 'tetex-xdvi' linux package, and now it returns: Error: Can't
open display. I guess the reason for this is that the machine is a VPS
terminal, so it has no display, however I dont understand why it does not
write to the PDF device. Some code:

> pdf("test.pdf")
> x <- matrix(1:6, nrow=2, dimnames=list(c('a','b'),c('c','d','this that')))
> latex(x)   # creates x.tex in working directory
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(/tmp/Rtmp7bbXMN/file643c9869.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german,
ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch,
esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk,
polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish,
tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/geometry/geometry.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/geometry/geometry.cfg))
No file file643c9869.aux.
[1] (./file643c9869.aux) )
Output written on file643c9869.dvi (1 page, 372 bytes).
Transcript written on file643c9869.log.
Error: Can't open display:


-----
Jeroen Ooms * Dept. of Methodology and Statistics * Utrecht University 

Visit  http://www.jeroenooms.com www.jeroenooms.com  to explore some of my
current projects.





 
-- 
View this message in context: http://www.nabble.com/-Hmisc--Latex-to-pdf-tp25316986p25316986.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list