2

I'm new to sweave, and I keep getting errors. I'm trying to run the following file:

\documentclass[a4paper]{article}

\begin{document}
\SweaveOpts{concordance=TRUE}

Hello world!

\end{document}

And I'm just getting the error message:

Writing to file sweavetut.tex
Processing code chunks with options ...

You can now run (pdf)latex on 'sweavetut.tex'
Running pdflatex.exe on sweavetut.tex...failed
Error running C:/texlive/2015/bin/win32/pdflatex.exe (exit code 1)

I'm using Sweave on Rstudio in Windows:

version.string R version 3.3.0 (2016-05-03)

The file C:\texlive\2015\bin\win32\pdflatex.exe exists, so I'm not sure what's wrong.

UPDATE:

When I try to typeset sweavetut.tex in TeXworks, I get the following error:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./sweavetut.tex
LaTeX2e <2016/03/31>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(c:/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/texlive/2015/texmf-dist/tex/latex/base/size10.clo))

! LaTeX Error: File `Sweave.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
  • I cannot replicate your error. What happens when you run pdflatex from the command line on sweavetut.tex? – Werner Jun 22 '16 at 20:51
  • I'm not sure what you mean @Werner but I'll post what happens when I try to typeset sweavetut.tex in TeXworks. – RootFAIL Jun 22 '16 at 21:20
  • What does your "View Log" look like within RStudio? – Werner Jun 22 '16 at 21:35
  • Arghhh View Log gives me an "Error while opening file - The system cannot find the file specified" pop up window. – RootFAIL Jun 22 '16 at 21:51
  • Okay, compile again and try to open up the .log outside of RStudio. Not sure whether this is an RStudio error or something else. – Werner Jun 22 '16 at 22:17
  • Hmmm, so I might have messed up the files - I created a new .Rnw script with the same code and everything works fine. (The sweavetut.log file never opened outside of RStudio, so I figured the issue was deeper). Thanks! Is there a way of marking this as resolved? – RootFAIL Jun 22 '16 at 22:40
  • 4
    I'm voting to close this question as off-topic because the issue was resolved outside of the realm of (La)TeX. – Werner Jun 22 '16 at 22:46

0 Answers0