This blog shows a very clear tutorial on how connecting R-sweave to your Latex system. R-sweave (you can see it in the “New” button >> “R Sweave”) is a facility in R environment to generate neat report based on your R code. This function allows us to make a document report of your R codes, on Latex format. The fun thing is R-sweave will run your codes then put it in your Latex doc report automatically.
For you that are “still” using MS Word, you’ll have to copy-paste your R codes to the Word doc back and forth (but there’s “Pandoc” or “Pander” package that do the converting for you.
Thanks to Friedrich Leisch for sharing the tutorial.
I’m trying to teach myself R for a work-related project. The documentation is absolutely terrible for beginners, which is a shame, since the language is easy. Stuff that should take 1 minute takes 4 hours because there is a paucity of good tutorials on the Internet.
R comes with Sweave preinstalled. The concept is pretty cool. If you want to lay out your journal article or publication using LaTeX, then Sweave allows you to imbed the R code in the LaTeX document. It goes like this:
- You have two things: your source data file and your R code.
- You put the R code into a file that Sweave will process. That file can have several different extensions, like .Snw or .Rnw, for example. The Sweave file also includes your LaTeX code for formatting the final document.
- From within the R environment (this also can be done from the command line)…
View original post 383 more words