Re: [R] Hmisc latex() does not want to work

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Sun, 13 Jan 2008 20:48:55 -0600

Richard M. Heiberger wrote:
>
> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] 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_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. Received on Mon 14 Jan 2008 - 02:57:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Jan 2008 - 04:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive