Shi, Tao wrote:
Hi list,
Excuse me b/c this is probably a more "TeX" then "R"
question.
I've been using "latex" function in my .Rnw file to
generate tables, but I've always been using it without assigning the
result to a object, i.e.
x <- matrix(1:6, nrow=2,
dimnames=list(c('a','b'),c('c','d','this that')))
latex(x)
so, I always get the error window (attached) poped out. But since I can
just click OK and everything seems fine except in my working directory I get a bunch of "junk" files (.log, .dvi, etc...), I've been ignoring
it.
Your attachment did not come through, most likely because it is not a
type that is supported by the list.
Now I know by doing e.g. tmp <- latex(x) will suppress
this error message, but I'm still curious on how to get rid of the error window when I just use latex(x). I read the "Example" section of
"latex" help file and I tried to include the following into my PATH:
"C:\Program Files\MiKTeX 2.7\tex\latex"
Well I can't directly help you with your issue, since I don't know what
error you're receiving, the reason this is happening is that when you
don't assign the result of your latex call, the function 'print.latex'
is getting called, which if I understand tries to compile the LaTeX
output and display the result in a suitable viewer. By assigning the
results of the latex call in R, you stop this printing from happening.
As for what your issue is, I don't know since your attachment did not
come through.
______________________________________________
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.