Sweave (latex + R) tutorial

Опубликовано: 16 Октябрь 2024
на канале: Ehsan Karim
29,361
35

http://www.youtube.com/subscription_c...
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Sweave is an R function now available by default (no need to install any additional package for Sweave) which can combine R codes and latex documents for reproducing results. This video is a tutorial of how to run Sweave to obtain a dvi or pdf file. It is expected that the viewers already familiar with R and Latex commands. In this videl, I also used Tinn-R http://sciviews.org/Tinn-R/ (free) for *.Rnw extension editor and to run Sweave() function http://rss.acs.unt.edu/Rdoc/library/u... from R console by clicking "R send: Sweave (file)" (or you could just run Sweave('test3.Rnw') in your R console without needing any fancy editor if this file is in the working directory) and WinEdt 5.4 http://www.winedt.com/ as *.tex editor (or you could use free TeXnicCenter http://www.texniccenter.org/). Also for Windows users, it shows the trick to obtain Sweave.sty file (for the case when you have spaces in the path) from standard default folder C:/PROGRA~1/R/R-2.12.2/share/texmf/tex/latex/ for the R version 2.12.2 For details, see http://www.stat.umn.edu/~charlie/Sweave/ or a nice blog http://www.r-bloggers.com/getting-sta... or its homepage http://www.stat.uni-muenchen.de/~leis... where you can obtain the example file shown here: http://www.stat.uni-muenchen.de/~leis...