Dear R?ers I?m trying to get a summary table using latex and summary in the rms package to no avail. I?m running R 2.10.1, Mac OS X snow leopard and I have the mactex 2009 distribution installed. Any obvious things I?m missing? //M options(digits=3) set.seed(173) sex <- factor(sample(c("m","f"), 500, rep=TRUE)) age <- rnorm(500, 50, 5) treatment <- factor(sample(c("Drug","Placebo"), 500, rep=TRUE)) f <- summary(treatment ~ age + sex + Symptoms, method="reverse", test=TRUE) latex(f) results in the following: This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) entering extended mode (/var/folders/q9/q9COp2FREsikCyHB7w+OxE+++TI/-Tmp-//RtmpVIk0iB/file587f83cb.tex LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, ar abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, ku rmanji, latin, latvian, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, po lish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, span ish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded. (/usr/local/texlive/2009/texmf-dist/tex/latex/base/report.cls Document Class: report 2007/10/19 v1.4h Standard LaTeX document class (/usr/local/texlive/2009/texmf-dist/tex/latex/base/size10.clo)) (/usr/local/texlive/2009/texmf-dist/tex/latex/geometry/geometry.sty (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifpdf.sty) (/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifvtex.sty) (/usr/local/texlive/2009/texmf-dist/tex/xelatex/xetexconfig/geometry.cfg)) No file file587f83cb.aux. *geometry auto-detecting driver* *geometry detected driver: dvips* Overfull \hbox (1.14412pt too wide) in paragraph at lines 9--23 [] [1] (./file587f83cb.aux) LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. ) (see the transcript file for additional information) Output written on file587f83cb.dvi (1 page, 1620 bytes). Transcript written on file587f83cb.log. sh: xdvi: command not found
moleps wrote:> Dear R?ers > > I?m trying to get a summary table using latex and summary in the rms > package to no avail. I?m running R 2.10.1, Mac OS X snow leopard and > I have the mactex 2009 distribution installed. Any obvious things I?m > missing? >> file587f83cb.log. sh: xdvi: command not foundYou apparently don't have xdvi installed, which is used to view the resulting document. How you get that installed on your OS, I don't know. Depending on what you're doing, you might want to use the "file" argument of latex function to output a latex file, and then do further processing. Also, assigning the latex function call to a variable, x <- latex(...) will suppress printing of the object, which is ultimately what is trying to use xdvi.
moleps <moleps2 at gmail.com> writes: Apparently you don't have xdvi installed on your system. HTH Georg> Dear R?ers > > I?m trying to get a summary table using latex and summary in the rms package to no avail. I?m running R 2.10.1, Mac OS X snow leopard and I have the mactex 2009 distribution installed. Any obvious things I?m missing? > > //M > > > > options(digits=3) > set.seed(173) > sex <- factor(sample(c("m","f"), 500, rep=TRUE)) > age <- rnorm(500, 50, 5) > treatment <- factor(sample(c("Drug","Placebo"), 500, rep=TRUE)) > f <- summary(treatment ~ age + sex + Symptoms, method="reverse", test=TRUE) > > latex(f) > > results in the following: > > > This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) > entering extended mode > > (/var/folders/q9/q9COp2FREsikCyHB7w+OxE+++TI/-Tmp-//RtmpVIk0iB/file587f83cb.tex > LaTeX2e <2009/09/24> > Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh > yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, ar > abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc > h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono > greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, ku > rmanji, latin, latvian, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, po > lish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, span > ish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded. > (/usr/local/texlive/2009/texmf-dist/tex/latex/base/report.cls > Document Class: report 2007/10/19 v1.4h Standard LaTeX document class > (/usr/local/texlive/2009/texmf-dist/tex/latex/base/size10.clo)) > (/usr/local/texlive/2009/texmf-dist/tex/latex/geometry/geometry.sty > (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/keyval.sty) > (/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifpdf.sty) > (/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifvtex.sty) > (/usr/local/texlive/2009/texmf-dist/tex/xelatex/xetexconfig/geometry.cfg)) > No file file587f83cb.aux. > *geometry auto-detecting driver* > *geometry detected driver: dvips* > > Overfull \hbox (1.14412pt too wide) in paragraph at lines 9--23 > [] > [1] (./file587f83cb.aux) > > LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. > > ) > (see the transcript file for additional information) > Output written on file587f83cb.dvi (1 page, 1620 bytes). > Transcript written on file587f83cb.log. > sh: xdvi: command not found
xdvi is installed in the same location as yours. I even did a reinstallment of mactex. Still doesnt work. But since I?m now convinced its related to my latex distribution I?ll take the problem elsewhere.. Regards, //M On 16. juni 2010, at 17.19, Prof Brian Ripley wrote:> On Wed, 16 Jun 2010, Erik Iverson wrote: > >> >> >> moleps wrote: >>> Dear R?ers >>> I?m trying to get a summary table using latex and summary in the rms >>> package to no avail. I?m running R 2.10.1, Mac OS X snow leopard and >>> I have the mactex 2009 distribution installed. Any obvious things I?m >>> missing? >> >>> file587f83cb.log. sh: xdvi: command not found >> >> You apparently don't have xdvi installed, which is used to view the resulting > > xdvi is part of MacTeX 2009. So the latter may be installed, but it is not in the path or incomplete or .... I have > > tystie% which xdvi > /usr/texbin/xdvi > > >> document. How you get that installed on your OS, I don't know. Depending on what you're doing, you might want to use the "file" argument of latex function to output a latex file, and then do further processing. Also, assigning the latex function call to a variable, x <- latex(...) will suppress printing of the object, which is ultimately what is trying to use xdvi. >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595
moleps wrote:> xdvi is installed in the same location as yours. I even did a > reinstallment of mactex. Still doesnt work. But since I?m now > convinced its related to my latex distribution I?ll take the problem > elsewhere..And the directory that xdvi is located in is in your path?
moleps wrote:> Dear R?ers > > I?m trying to get a summary table using latex and summary in the rms package to no avail. I?m running R 2.10.1, Mac OS X snow leopard and I have the mactex 2009 distribution installed. Any obvious things I?m missing? > > //M > > > > options(digits=3) > set.seed(173) > sex <- factor(sample(c("m","f"), 500, rep=TRUE)) > age <- rnorm(500, 50, 5) > treatment <- factor(sample(c("Drug","Placebo"), 500, rep=TRUE)) > f <- summary(treatment ~ age + sex + Symptoms, method="reverse", test=TRUE) > > latex(f) > > results in the following: > > > This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) > entering extended mode > > (/var/folders/q9/q9COp2FREsikCyHB7w+OxE+++TI/-Tmp-//RtmpVIk0iB/file587f83cb.tex > LaTeX2e <2009/09/24> > Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh > yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, ar > abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc > h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono > greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, ku > rmanji, latin, latvian, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, po > lish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, span > ish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded. > (/usr/local/texlive/2009/texmf-dist/tex/latex/base/report.cls > Document Class: report 2007/10/19 v1.4h Standard LaTeX document class > (/usr/local/texlive/2009/texmf-dist/tex/latex/base/size10.clo)) > (/usr/local/texlive/2009/texmf-dist/tex/latex/geometry/geometry.sty > (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/keyval.sty) > (/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifpdf.sty) > (/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifvtex.sty) > (/usr/local/texlive/2009/texmf-dist/tex/xelatex/xetexconfig/geometry.cfg)) > No file file587f83cb.aux. > *geometry auto-detecting driver* > *geometry detected driver: dvips* > > Overfull \hbox (1.14412pt too wide) in paragraph at lines 9--23 > [] > [1] (./file587f83cb.aux) > > LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. > > ) > (see the transcript file for additional information) > Output written on file587f83cb.dvi (1 page, 1620 bytes). > Transcript written on file587f83cb.log. > sh: xdvi: command not found >I believe there is something in the latex help page in the rms package that talks about preview difficulties on MAC. -- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016