Richard M. Heiberger wrote: > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of John Kane > Sent: Sunday, January 13, 2008 03:56 PM > > ## Not run: > latex(x) # creates x.tex in working directory > w <- latex(x, file='/tmp/my.tex') > --------------------------------------------- > > I think there is an unclarity in the documentation. The documentation > is correct and everything that Frank and Gabor wrote > is also correct. The issue is side-effects, which I think need a bit more > explanation. I would revise the first example above to read: > > > latex(x) ## 1. creates x.tex in working directory and > ## > ## 2. The result of the command is an object of class "latex" > ## which is automatically printed by the latex print method. > ## The latex print method prepends and appends latex headers > and > ## calls the latex program in the PATH. If the latex program > is > ## not in the PATH, you will get error messages from the > operating > ## system. > > Since you didn't have latex in the PATH, you got an error from the print > method. The x.tex file was probably correctly generated and might still be > sitting > in your default getwd() directory. > > The second example, > w <- latex(x, file='/tmp/my.tex') > doesn't give an error message because the result of the latex() command is > saved in the object w and not automatically printed. > > > Rich
Good - added that in the examples section for the next release of Hmisc. Thanks Rich Frank ______________________________________________ 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.