[R] Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}

Lauri Nikkinen lauri.nikkinen at iki.fi
Wed Jun 18 07:27:22 CEST 2008


Thanks. Actually I didn't get the point from Duncan's post but I think
I found a workaround:

\usepackage{C:/progra\string~1/R/R-27\string~1.0/share/texmf/Sweave}

Cheers,
Lauri



2008/6/17, Gabor Grothendieck <ggrothendieck at gmail.com>:
> See:
>
> https://stat.ethz.ch/pipermail/r-devel/2008-May/049609.html
>
> On Tue, Jun 17, 2008 at 3:08 PM, Lauri Nikkinen <lauri.nikkinen at iki.fi> wrote:
> > R users,
> >
> > I'm at a loss with a problem considering running .tex files produced
> > by Sweave. When I run (R 2.7.0):
> > ---------------------------------------------------
> > #Taken from ?Sweave
> > testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils")
> >
> > ## enforce par(ask=FALSE)
> > options(device.ask.default=FALSE)
> >
> > ## create a LaTeX file
> > Sweave(testfile)
> > ---------------------------------------------------
> >
> > I get a .tex file:
> > ----------------------------------------------------
> > % -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
> > \documentclass[a4paper]{article}
> >
> > \title{A Test File}
> > \author{Friedrich Leisch}
> >
> >
> > \usepackage{a4wide}
> >
> > \usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
> > \begin{document}
> >
> > \maketitle
> >
> > A simple example that will run in any S engine: The integers from 1 to
> > 10 are
> > \begin{Schunk}
> > \begin{Soutput}
> >  [1]  1  2  3  4  5  6  7  8  9 10
> > \end{Soutput}
> > \end{Schunk}
> >
> > We can also emulate a simple calculator:
> > …etc.
> > ----------------------------------------------------------
> >
> > When I run this file Latex  Pdf using MikTeX 2.7 and TeXnicCenter I
> > get an error message. I know that it has something to do with
> >
> > \usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
> >
> > and '~' sign. How can I get pass this error?
> >
> > Best
> > Lauri
> > ______________________________________________
> > 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