[R] *SOLVED* latex{Hmisc} cannot find xdvi on MAC OS X

Kevin E. Thorpe kevin.thorpe at utoronto.ca
Fri Jan 25 17:43:58 CET 2008

With thanks to all who responded, especially Charles Berry and
Don MacQueen, my student has everything working.  The final
solution was:

1. Install X11 and X11SDK (or make sure they are installed).
2. There is a button for starting X11 within the R GUI.
3. Sys.setenv( PATH=paste(Sys.getenv("PATH"),"/usr/texbin",sep=":") )

After doing this, latex() worked as desired when R is started
from the MAC Finder.

She and I thank you.


Kevin E. Thorpe wrote:
> Hello.
> I am posting this on behalf of a student in my class.  I have been
> introducing them to R.
> I suspect that the problem I need help with is not so much an R
> issue, but a MAC config issue, but I don't have enough MAC
> experience to know what to do.
> Anyway, on to the problem.  We are using Frank Harrell's Hmisc
> and Design packages.  This student also wishes to use the latex
> formatting facilities provided in those packages so she has installed
> LaTeX.
> When she does something like latex(describe(dataframe)), the latex
> file is produced, the dvi file is successfully written but then
> the error "sh: line 1: xdvi: command not found" appears.
> I started a terminal and a "which xdvi" returned the path
> where it found xdvi.  So, it appears that xdvi is in the
> My apologies, I forgot to get her sessionInfo() but I think
> she is running R 2.6.?

Kevin E. Thorpe
Biostatistician/Trialist, Knowledge Translation Program
Assistant Professor, Department of Public Health Sciences
Faculty of Medicine, University of Toronto
email: kevin.thorpe at utoronto.ca  Tel: 416.864.5776  Fax: 416.864.6057

More information about the R-help mailing list