[R] a question about "latex" in Hmisc

Shi, Tao shidaxia at yahoo.com
Thu May 13 21:05:43 CEST 2010

Hi Duncan,

I have no problems running latex or pdflatex.  I re-ran my code and it seems the problem is that R (or MiKTex ?) put the .tex file (the one wrapping everything in a document format for displaying purpose) in a R tmp folder, but the corresponding .log, .aux, and .dvi in my working directory.  So when YAP was called, it was looking for the .dvi file in the R temp folder.  Therefore, the error window.  


I wonder how to fix that?



----- Original Message ----
> From: Duncan Murdoch <murdoch.duncan at gmail.com>
> To: "Shi, Tao" <shidaxia at yahoo.com>
> Cc: Ista Zahn <istazahn at gmail.com>; r-help at r-project.org
> Sent: Wed, May 12, 2010 1:40:50 PM
> Subject: Re: [R] a question about "latex" in Hmisc
> On 12/05/2010 4:33 PM, Shi, Tao wrote:
> Hi Ista,
> Thanks 
> for the reply!
> You actually misunderstood me.  I never 
> objected the "tmp <- latex(x)" method (in fact, that's what I'm doing now in 
> my .Rnw file).  As I stated in my original post, I'm simply curious about 
> what causes the error window and wanted to get to the bottom of 
> it.
latex(x) returns an object of class "latex".  When 
> you don't assign it, it prints.  The print method for "latex" objects tries 
> to run latex and then display the resulting .dvi file.  (Or maybe it runs 
> pdflatex and displays the .pdf file).

If you can't run latex, you can't 
> print those objects.  That's why you're getting an error.

> Murdoch

More information about the R-help mailing list