[R] problem with Sweave on 1.6 on NT4

Friedrich.Leisch@ci.tuwien.ac.at Friedrich.Leisch at ci.tuwien.ac.at
Fri Oct 11 10:05:33 CEST 2002


>>>>> On Thu, 10 Oct 2002 10:44:04 +0100,
>>>>> John Gavin (JG) wrote:

  > Hi,
  > I recently compiled 1.6 on NT4 but
  > I am having a problem with Sweave.

  > Using the inbuilt 'Sweave-test-1.Rnw' file as an example:

  > -------
  >> library(tools)
  >> testfile <- file.path(.path.package("tools"),
  >                       "Sweave", "Sweave-test-1.Rnw")

  > ## create a LaTeX file
  > Sweave(testfile)
  > testfile <- file.path(.path.package("tools"),
  > +                       "Sweave", "Sweave-test-1.Rnw")
  >> 
  >> ## create a LaTeX file
  >> Sweave(testfile)
  > Writing to file Sweave-test-1.tex
  > Processing code chunks ...
  >  1 : print term verbatim
  >  2 : term hide
  >  3 : echo print term verbatim
  >  4 : term verbatim
  >  5 : echo term verbatim
  >  6 : echo term verbatim eps pdf
  >  7 : echo term verbatim eps pdf

  > You can now run LaTeX on Sweave-test-1.tex 
  > ---------

  > But the opening lines of Sweave-test-1.tex are: 

  > ---------
  > % -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
  > \documentclass[a4paper]{article}

  > \title{A Test File}
  > \author{Friedrich Leisch}


  > \usepackage{a4wide}

  > \usepackage{c:etcRrw1060/share/texmf/Sweave}
  > \begin{document}
  > ...
  > ------------

  > The line '\usepackage{c:etcRrw1060/share/texmf/Sweave}' is wrong.
  > In V1.5.1 it used to read 
  > \usepackage{c:/etc/R/rw1051/library/tools/Sweave/Sweave}
  > i.e. 'c:etcRrw1060' should be 'c:/etc/R/rw1060' 
  > and I think the reference should be 
  > c:/etc/R/rw1060/library/tools/Sweave/Sweave,
  > (not the 'share/texmf' folder) as that is where Sweave.sty is.
  > (The only *.sty file in the folder 'share/texmf/' is Rd.sty.)

  > Is there is something that I try to set to get Sweave
  > insert the correct line in latex to load the Sweave.sty file?


The line is correct (I want Sweave.sty to be in $R_HOME/share/texmf),
but the install procedure had a bug which I have fixed a few minutes
ago. This caused Sweave.sty not to be copied to $R_HOME/share/texmf.

As a quick fix for 1.6.0: please copy Sweave.sty manually to
$R_HOME/share/texmf.

Another thing is the c:etcRrw1060 ... does R.home() work properly on
your system or do we have a problem there? 


Best,
Fritz

-- 
-------------------------------------------------------------------
                        Friedrich Leisch 
Institut für Statistik                     Tel: (+43 1) 58801 10715
Technische Universität Wien                Fax: (+43 1) 58801 10798
Wiedner Hauptstraße 8-10/1071      Friedrich.Leisch at ci.tuwien.ac.at
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
-------------------------------------------------------------------


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list