Dear Kaspar, > -----Original Message----- > From: Kasper Daniel Hansen [mailto:[email protected]] > Sent: April-17-11 5:59 PM > To: John Fox > Cc: Prof Brian Ripley; [email protected] > Subject: Re: [R-SIG-Mac] problem checking packages with R 2.13.0 > > John, > > I don't know about Eclipse, but on a Mac it is completely standard that a > GUI does not inherit anything from .bashrc/.profile. So it is pretty > standard that you may have problems with environment variables. > You can do two things > (1) use environment.plist (google it) > (2) use Sys.setenv() inside your .Rprofile
That helps a bit. That is, I didn't previously have a .Rprofile file, so I put one in my home directory, setting the PATH to /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin. Now both R CMD check in a terminal window and checking inside eclipse fail with the same error, "!pdfTeX error: pdflatex (file 8r.enc): cannot open encoding file (etc.)", rather than with different errors. So, at this point, I don't think that finding pdflatex is the issue. > > Now, regarding latex, the standard on Mac would be to run MacTex. I am > unaware of how R.app deals with MacTex but I would be ready to guess that > the PATH might be semi-build in (I am sure some of the R.app people will > correct me on this). So you might want to add info about what tex > distribution you are using. Good point. I used the MacTeX-2010 distribution, which I got to from item 2.1 in the R for Mac OS X FAQ. Thanks for trying to help. John > > Kasper > > > > On Sun, Apr 17, 2011 at 4:21 PM, John Fox <[email protected]> wrote: > > Dear Brian and others, > > > > Yes, I installed the CRAN build of R, and yes, something is changing > > the path in R.app, and in eclipse, but not apparently when R is run in > > a terminal window. > > > > >From a terminal window: > > > > ------------- snip -------------- > > > > John-Foxs-MacBook-Pro:Rmpi jfox$ R > > > > R version 2.13.0 (2011-04-13) > > Copyright (C) 2011 The R Foundation for Statistical Computing ISBN > > 3-900051-07-0 > > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > > > . . . > > > >> Sys.getenv("PATH") > > [1] > "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin" > > > > ------------- snip -------------- > > > > In R.app (and in R64.app): > > > > ------------- snip -------------- > > > > R version 2.13.0 (2011-04-13) > > Copyright (C) 2011 The R Foundation for Statistical Computing ISBN > > 3-900051-07-0 > > Platform: i386-apple-darwin9.8.0/i386 (32-bit) > > > > . . . > > > > [R.app GUI 1.40 (5751) i386-apple-darwin9.8.0] > > > > [History restored from /Users/jfox/.Rapp.history] > > > >> Sys.getenv("PATH") > > [1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" > > > > ------------- snip -------------- > > > > And in eclipse: > > > > ------------- snip -------------- > > > > R version 2.13.0 (2011-04-13) > > Copyright (C) 2011 The R Foundation for Statistical Computing ISBN > > 3-900051-07-0 > > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > > > . . . > > > >> Sys.getenv("PATH") > > [1] > > "/Library/Frameworks/R.framework/Versions/2.13/Resources/bin:/usr/bin: > > /bin:/ > > usr/sbin:/sbin" > > > > ------------- snip -------------- > > > > I've had no luck, however, figuring out what's changing the path: As > > far as I can tell, I have no Rprofile.site file, no .Rprofile file, > > and the R_PROFILE and R_PROFILE_USER environment variables are unset. > > In fact the only R initialization files that I could find anywhere on > > my system are the Rprofile files in the base and Rmpi packages; as far > > as I can see, the former can't shorten the path and I'm not using the > latter. > > > > Finally, looking more closely at the errors I'm getting when I try to > > check a package, the errors in a terminal window and from eclipse look > different: > > > > >From a terminal window, I think that pdflatex is actually found; to > > >repeat > > the error message: > > > > ------------- snip -------------- > > > > * checking PDF version of manual ... WARNING LaTeX errors when > > creating PDF version. > > This typically indicates Rd problems. > > LaTeX errors found: > > !pdfTeX error: pdflatex (file 8r.enc): cannot open encoding file for > > reading ==> Fatal error occurred, no output PDF file produced! > > * checking PDF version of manual without hyperrefs or index ... ERROR > > > > ------------- snip -------------- > > > > >From eclipse, pdflatex clearly isn't found: > > > > ------------- snip -------------- > > > > * checking PDF version of manual ... WARNING LaTeX errors when > > creating PDF version. > > This typically indicates Rd problems. > > * checking PDF version of manual without hyperrefs or index ... ERROR > > Re-running with no redirection of stdout/stderr. > > Hmm ... looks like a package > > You may want to clean up by 'rm -rf > > /var/folders/ay/ayD+f6yQFomFC5SGQV6vP++++TI/-Tmp- > > //RtmpopONVs/Rd2pdf16f793c' > > Error in texi2dvi("Rd2.tex", pdf = (out_ext == "pdf"), quiet = FALSE, : > > pdflatex is not available > > Error in running tools::texi2dvi > > > > ------------- snip -------------- > > > > So there are possibly two independent problems here. > > > > I'm not sure where to look next, so again any help would be appreciated. > > > > Best, > > John > > > > > >> -----Original Message----- > >> From: Prof Brian Ripley [mailto:[email protected]] > >> Sent: April-17-11 1:37 AM > >> To: John Fox > >> Cc: [email protected] > >> Subject: Re: [R-SIG-Mac] problem checking packages with R 2.13.0 > >> > >> On Sat, 16 Apr 2011, John Fox wrote: > >> > >> > Dear list members, > >> > > >> > I'm experiencing a problem checking packages with R 2.13.0 on a new > >> > Mac OS X 10.6.7 system. As far as I can tell, R isn't finding my > >> > LaTeX installation. Packages seem to build fine. Some details > >> > follow: > >> > >> Assuming this is the CRAN build of R, it is looking on the path. So > >> all I can think is that you have the path set incorrectly somewhere > >> in your R statrtup files. > >> > >> > >> > > >> > Here's what happens when I try to check a package: > >> > > >> > ----- snip ------ > >> > > >> > John-Foxs-MacBook-Pro:workspace jfox$ R CMD check car > >> > * using log directory ?/Users/jfox/Documents/workspace/car.Rcheck? > >> > * using R version 2.13.0 (2011-04-13) > >> > * using platform: x86_64-apple-darwin9.8.0 (64-bit) > >> > * using session charset: UTF-8 > >> > * checking for file ?car/DESCRIPTION? ... OK > >> > * this is package ?car? version ?2.0-10? > >> > . . . > >> > * checking examples ... OK > >> > * checking PDF version of manual ... WARNING LaTeX errors when > >> > creating PDF version. > >> > This typically indicates Rd problems. > >> > LaTeX errors found: > >> > !pdfTeX error: pdflatex (file 8r.enc): cannot open encoding file > >> > for reading ==> Fatal error occurred, no output PDF file produced! > >> > * checking PDF version of manual without hyperrefs or index ... > >> > ERROR > >> > > >> > ----- snip ------ > >> > > >> > I get the following error when I try to check the package under > >> eclipse/StatET (deleting the lines before the error): > >> > > >> > > >> > ----- snip ------ > >> > > >> > * checking PDF version of manual ... WARNING LaTeX errors when > >> > creating PDF version. > >> > This typically indicates Rd problems. > >> > * checking PDF version of manual without hyperrefs or index ... > >> > ERROR Re-running with no redirection of stdout/stderr. > >> > Hmm ... looks like a package > >> > You may want to clean up by 'rm -rf > >> /var/folders/ay/ayD+f6yQFomFC5SGQV6vP++++TI/-Tmp- > >> //RtmpopONVs/Rd2pdf16f793c' > >> > Error in texi2dvi("Rd2.tex", pdf = (out_ext == "pdf"), quiet = > FALSE, : > >> > pdflatex is not available > >> > Error in running tools::texi2dvi > >> > > >> > > >> > ----- snip ------ > >> > > >> > But I have no problem running pdflatex from a terminal window: > >> > > >> > > >> > ----- snip ------ > >> > > >> > John-Foxs-MacBook-Pro:~ jfox$ pdflatex --help > >> > Usage: pdftex [OPTION]... [TEXNAME[.tex]] [COMMANDS] > >> > or: pdftex [OPTION]... \FIRST-LINE > >> > > >> > ----- snip ----------- > >> > > >> > Nor does Sys.which() seem to find pdflatex: > >> > > >> > ----- snip ------ > >> > > >> > R version 2.13.0 (2011-04-13) > >> > Copyright (C) 2011 The R Foundation for Statistical Computing ISBN > >> > 3-900051-07-0 > >> > Platform: i386-apple-darwin9.8.0/i386 (32-bit) > >> > > >> > . . . > >> > > >> > [R.app GUI 1.40 (5751) i386-apple-darwin9.8.0] > >> > > >> > [History restored from /Users/jfox/.Rapp.history] > >> > > >> >> Sys.which("pdflatex") > >> > pdflatex > >> > "" > >> > > >> > ----- snip ------ > >> > > >> > Some more information about my system: > >> > > >> > ----- snip ------ > >> > > >> >> Sys.info() > >> > > >> sysname > >> > > >> "Darwin" > >> > > >> release > >> > > >> "10.7.3" > >> > > >> > version "Darwin Kernel Version 10.7.3: Sun Mar 6 13:37:56 PST > >> > 2011; > >> root:xnu-1504.14.2~1/RELEASE_X86_64" > >> > > >> nodename > >> > > >> "John-Foxs-MacBook-Pro.local" > >> > > >> machine > >> > > >> "x86_64" > >> > > >> login > >> > > >> "jfox" > >> > > >> user > >> > > >> "jfox" > >> > > >> >> sessionInfo() > >> > R version 2.13.0 (2011-04-13) > >> > Platform: i386-apple-darwin9.8.0/i386 (32-bit) > >> > > >> > locale: > >> > [1] en_CA.UTF-8/en_CA.UTF-8/C/C/en_CA.UTF-8/en_CA.UTF-8 > >> > > >> > attached base packages: > >> > [1] stats graphics grDevices utils datasets methods > >> > base > >> > > >> > ----- snip ------ > >> > > >> > Any suggestions would be appreciated. > >> > > >> > Thanks, > >> > John > >> > > >> > ------------------------------------------------ > >> > John Fox > >> > Sen. William McMaster Prof. of Social Statistics Department of > >> > Sociology McMaster University Hamilton, Ontario, Canada > >> > http://socserv.mcmaster.ca/jfox/ > >> > > >> > _______________________________________________ > >> > R-SIG-Mac mailing list > >> > [email protected] > >> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > >> > > >> > >> -- > >> Brian D. Ripley, [email protected] 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 > > > > _______________________________________________ > > R-SIG-Mac mailing list > > [email protected] > > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > > _______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
