From: Scillieri, John <John.Scillieri_at_constellation.com>

Date: Tue, 17 Jun 2008 15:17:53 -0400

#Taken from ?Sweave

testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils")

% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-

\documentclass[a4paper]{article}

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

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. Received on Tue 17 Jun 2008 - 19:20:44 GMT

Date: Tue, 17 Jun 2008 15:17:53 -0400

Try moving your R directory out of the C:\Program Files directory.

#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

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. Received on Tue 17 Jun 2008 - 19:20:44 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Tue 17 Jun 2008 - 20:31:52 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*