Don MacQueen wrote: > Nobody seems to have asked whether the student is using R from the Mac > GUI, or R at the unix-style command line prompt. > > I have R 2.6.1 installed on a Mac running OS 10.4.11. When I start R at > the command prompt in a terminal emulator in the X windows environment, > the example expression, latex(describe(dataframe)), succeeds. xdvi > starts up and displays the preview. > > When I use the Mac GUI, xdvi does not start up. Both ways of starting R > are using the same installation of R. > > When started by double-clicking on the icon that represents R, the unix > path is not inherited. It's probably more accurate to say that PATH > does not exist, because no unix shell has been started. There are other > mechanisms for creating environment variables that R can obtain via > Sys.getenv(). (Create a file named environment.plist, or something like > that, but I don't remember the exact details.) > > Even if the R gui environment is set up so that the path to xdvi is > available, it won't necessarily work, because xdvi requires that an X > windows server and window manager be running. That's not normally the > case for most Mac users (one assumes). On Mac OS 10.5.x those should > start automatically when xdvi is started, but not on earlier versions of > Mac OS. > > (As an aside, this is probably the answer to Frank's comment, "shame on > Mac" (for not inheriting path) -- if one wants the Mac to act like a > linux box, then one must do one's work from within a unix shell. That's > done either from the Terminal application, or other terminal emulator.) > > The experts on this issue are best reached through R-sig-mac. A search > of the archives will probably reveal how to define unix stye environment > variables such as PATH, that the Mac R gui can use. The Mac-related > pages at CRAN may also have this information. > > -Don
Thanks for this additional info. She is running from the MAC GUI. The fixed Sys.setenv() now fixes the xdvi not found, but throws this error. dyld: Library not loaded: /usr/X11R6/lib/libXaw.7.dylib Referenced from: /usr/texbin/xdvi-xaw.bin Reason: image not found 2008-01-24 17:11:08.253 R[1370] tossing reply message sequence 3 on thread 0x3d31450 This certainly looks to me like the X libs are not loaded. Am I remembering correctly that there is a Start X menu item in the MAC GUI for R or elsewhere? BTW, I requested her sessionInfo(). Here it is. > sessionInfo() R version 2.6.1 (2007-11-26) powerpc-apple-darwin8.10.1 locale: en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 attached base packages: [1] splines stats graphics grDevices utils datasets methods [8] base other attached packages: [1] Design_2.1-1 survival_2.34 Hmisc_3.4-3 lattice_0.17-2 loaded via a namespace (and not attached): [1] cluster_1.11.9 grid_2.6.1 So the MAC OS is 8.10.1? Earlier than the 8.10.5 you mention above. Thanks, Kevin > At 9:22 AM -0500 1/23/08, 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 >> PATH. >> >> 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: [EMAIL PROTECTED] Tel: 416.864.5776 Fax: 416.864.6057 ______________________________________________ R-help@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.