[R] sweave and R. Searching for a document that will get mestarted

Gabor Grothendieck ggrothendieck at gmail.com
Mon Aug 10 17:50:00 CEST 2009


1. Install R, Adobe Reader (or other pdf reader)
and also install MiKTeX. Finally, download this example
Sweave input file:
   http://www.stat.uni-muenchen.de/~leisch/Sweave/example-2.Snw
and do this from the Windows cmd console:

   Rcmd Sweave example-2.Snw
   pdflatex example-2.tex
   example-2.pdf

The above require that the R bin directory and the relevant
MiKTeX directory are in your path.

Alternatively in http://batchfiles.googlecode.com you can find
Sweave.bat which you place anywhere in your path and then just
enter the single line:
Sweave example-2.Snw
This will also automatically find R and MiKTeX in most cases even
if you have not modified your path.

2. For more, read the Sweave User Manual, google for LaTeX tutorials
and for examples, see
- the example in the User Manual, and also
- look at the .Rnw file in any R package with a vignette, e.g. doBy package.
- for latex examples see http://arxiv.org where you can find thousands.

On Mon, Aug 10, 2009 at 10:57 AM, John
Sorkin<jsorkin at grecc.umaryland.edu> wrote:
> Windows XP
> R 2.8.1
>
> Last week I asked for help getting started with Sweave. It was suggested that I look into LaTeX. I am happy to do so, but as I do this, I need a source that will tell me how to set up and run Sweave. I don't expect to learn how to set up a LaTeX document from this source, but I would like to know, once a document is created how to get the LaTeX document to interact with Sweave and how I can produce a document that contains the results of my R session complete with graphs and text output. I
> Thank you,
> John
>
> John David Sorkin M.D., Ph.D.
> Chief, Biostatistics and Informatics
> University of Maryland School of Medicine Division of Gerontology
> Baltimore VA Medical Center
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
> (Phone) 410-605-7119
> (Fax) 410-605-7913 (Please call phone number above prior to faxing)
>
>>>> Liviu Andronic <landronimirc at gmail.com> 8/7/2009 5:55 AM >>>
> Hello,
>
> On Fri, Aug 7, 2009 at 9:26 AM, David Hajage<dhajage.r at gmail.com> wrote:
>> The hard task is to learn LaTeX.
>>
> You can get around learning (much of) LaTeX by using Sweave with LyX.
> You will find information in the r-help and lyx ML archives, and on
> Google.
> Liviu
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> Confidentiality Statement:
> This email message, including any attachments, is for th...{{dropped:6}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list