How to Get Sweave Working with RStudio on Red Hat


There is a known bug in Red Hat that when installing the R-core package, the style Sweave.sty is not located in the correct folder. This causes R (and thus RStudio) to improperly call Sweave:

To get Sweave working with RStudio on Red Hat, you should do the following:

Ensure that the texinfo-tex package is installed:

sudo yum install texinfo-tex

Move the Sweave.sty file to the correct location:

sudo mkdir /usr/share/texmf/tex/latex/sweave
sudo mv /usr/share/R/texmf/tex/latex/Sweave.sty /usr/share/texmf/tex/latex/sweave/

Run texhash to update your index:

sudo texhash