Lauri Nikkinen
2008-Jun-17 19:08 UTC
[R] Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
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
Scillieri, John
2008-Jun-17 19:17 UTC
[R] Sweave: problem withusepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
Try moving your R directory out of the C:\Program Files directory. I ended up setting up a C:\programs\ and putting all my unix-happy programs (R, latex, etc) there to ensure path spaces don't screw me up when running under windows. -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Lauri Nikkinen Sent: Tuesday, June 17, 2008 3:08 PM To: r-help at r-project.org Subject: [R] Sweave: problem withusepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave} 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.>>> This e-mail and any attachments are confidential, may contain legal, professional or other privileged information, and are intended solely for the addressee. If you are not the intended recipient, do not use the information in this e-mail in any way, delete this e-mail and notify the sender. CEG-IP1
Gabor Grothendieck
2008-Jun-17 20:11 UTC
[R] Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
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. >
Prof Brian Ripley
2008-Jun-18 06:04 UTC
[R] Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
>From the NEWS file for 2.7.0:o The default for 'stylepath' in Sweave's (default) RweaveLatex driver can be set by the environment variable SWEAVE_STYLEPATH_DEFAULT: see ?RweaveLatex. You want to set 'stylepath' to be false, and the easiest way to do this is to set that environment variable. In R 2.8.0 the default will be false. On Tue, 17 Jun 2008, Lauri Nikkinen 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. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595