Sweave is an R and S+ package for unifying R and S+ input and LaTeX document formatting. Put simply, Sweave allows document preparation to be fully self-replicating and updating. A Sweave file contains R code and LaTeX instructions in `code chunks' to be processed and integrated into the production of a document.