I am new to R, Sweave, and LaTeX. I am running StatET with Eclipse 3.7
on a Windows
7 x64 OS. StatET also includes the Sweave add-on, which I use to try and
compile a PDF document.

I also installed MiKTeX 2.9, because, previously, R could not execute texi2dvi
(presumably, because there was no TeX runner). Basically, no .tex file could
be compiled into PDF file. After I installed MiKTeX, I was successful at
compiling a .pdf file from .tex file.

However, the moment I introduce pdf() function into the .Rnw file, I get a
"fatal" error.

When trying to compile this simple .Rnw file:

=======================================================
%
\documentclass[a4paper]{article}
\usepackage[OT1]{fontenc}
\usepackage{Sweave}
\begin{document}

\title{pdftest.Rnw}
\author{Egor}

\maketitle

<<echo=F, results=hide>>=
pdf(file='figure1.pdf')
plot(1:10,1:10)
dev.off()
@

\end{document}
=======================================================

I get the following error message:

=======================================================
> Sweave(file = "C:/Users/Egor/Desktop/R/Head-tracking/pdftest.Rnw")
Writing to file pdftest.tex
Processing code chunks with options ...
 1 : term hide

You can now run (pdf)latex on 'pdftest.tex'
> require(tools)
> texi2dvi(file = "C:/Users/Egor/Desktop/R/Head-tracking/Data/pdftest.tex",
pdf = TRUE)
Error: running 'texi2dvi' on
'C:/Users/Egor/Desktop/R/Head-tracking/Data/pdftest.tex' failed

LaTeX errors:
C:/Users/Egor/Desktop/R/Head-tracking/Data/pdftest.tex:13:  ==> Fatal error
occ
urred, no output PDF file produced!
In addition: Warning message:
running command '"C:\PROGRA~1\MIKTEX~1.9\miktex\bin\x64\texi2dvi.exe"
--quiet --pdf "C:/Users/Egor/Desktop/R/Head-tracking/Data/pdftest.tex"  -I
"C:/Program Files/R/R-2.13.1/share/texmf/tex/latex" -I "C:/Program
Files/R/R-2.13.1/share/texmf/bibtex/bst"' had status 1
=======================================================

Tell me if you need any more details.

Thanks in advance for your help!
--Egor

	[[alternative HTML version deleted]]

