[R] odfWeave repeats output

Chris Beeley chris.beeley at gmail.com
Fri Aug 12 11:10:13 CEST 2011


Hello all-

I'm having a problem with odfWeave. I'm still testing it out, and have
used both of these code chunks, which I copied off a blog:

Number 1:

A sample document last processed
\Sexpr{Sys.time()}.
This simply illustrates the output from an
R command inserted into our document.
This is using \Sexpr{version$version.string}.

Number 2:

<<Sample1>>=

summary(iris)

@

Both do the same thing, which is generate the document using this code:

odfWeave("/media/Windows7/temp/GCAMT_in.odt",
"/media/Windows7/temp/GCAMT_out2.odt")

But the output repeats over and over in the document in a bizarre way,
stretching out over about 9 pages, like this (abbreviated):

A sample document last processed
2011-08-12 09:55:51.
This simply illustrates the output from an
R command inserted into our document.
This is using R version 2.12.1 (2010-12-16).

...

A sample document last processedA sample document last processed
2011-08-12 09:55:51.2011-08-12 09:55:51.
This simply illustrates the output from anThis simply illustrates the
output from an
R command inserted into our document.R command inserted into our document.
This is using R version 2.12.1 (2010-12-16).This is using R version
2.12.1 (2010-12-16).

...

etc.

The really weird thing is that I have replicated the problem across
two operating systems (dual boot on the same computer), windows 7
64bit and Linux Mint 11 (which is Ubuntu, not sure which version I'm
afraid). I've been unable to find anyone on any forums or anything
with the same problem.

Using R v2.13 on Windows, v 2.12 on Linux, was using RStudio but just
tested it without (just in case) and it does the same thing.

Any suggestions gratefully received.

Chris Beeley
Institute of Mental Health, UK.

Output of the operation is below.

With this output:

> odfWeave("/media/Windows7/temp/GCAMT_in.odt", "/media/Windows7/temp/GCAMT_out2.odt")
  Copying  /media/Windows7/temp/GCAMT_in.odt
  Setting wd to  /tmp/RtmpAwd1Bm/odfWeave12095551677
  Unzipping ODF file using unzip -o GCAMT_in.odt
Archive:  GCAMT_in.odt
 extracting: mimetype
   creating: Configurations2/statusbar/
  inflating: Configurations2/accelerator/current.xml
   creating: Configurations2/floater/
   creating: Configurations2/popupmenu/
   creating: Configurations2/progressbar/
   creating: Configurations2/toolpanel/
   creating: Configurations2/menubar/
   creating: Configurations2/toolbar/
   creating: Configurations2/images/Bitmaps/
  inflating: content.xml
  inflating: manifest.rdf
  inflating: styles.xml
 extracting: meta.xml
  inflating: Thumbnails/thumbnail.png
  inflating: settings.xml
  inflating: META-INF/manifest.xml

  Removing  GCAMT_in.odt
  Creating a Pictures directory

  Pre-processing the contents
  Sweaving  content.Rnw

  Writing to file content_1.xml
  Processing code chunks ...

  'content_1.xml' has been Sweaved

  Removing content.xml

  Post-processing the contents
  Removing content.Rnw
  Removing styles.xml
  Renaming styles_2.xml to styles.xml
  Removing manifest.xml
  Renaming manifest_2.xml to manifest.xml
  Removing extra files

  Packaging file using zip -r GCAMT_in.odt .
  adding: mimetype (stored 0%)
  adding: content.xml (deflated 98%)
  adding: settings.xml (deflated 84%)
  adding: meta.xml (deflated 57%)
  adding: META-INF/ (stored 0%)
  adding: META-INF/manifest.xml (deflated 83%)
  adding: styles.xml (deflated 93%)
  adding: manifest.rdf (deflated 54%)
  adding: Pictures/ (stored 0%)
  adding: Thumbnails/ (stored 0%)
  adding: Thumbnails/thumbnail.png (deflated 23%)
  adding: Configurations2/ (stored 0%)
  adding: Configurations2/progressbar/ (stored 0%)
  adding: Configurations2/images/ (stored 0%)
  adding: Configurations2/images/Bitmaps/ (stored 0%)
  adding: Configurations2/toolbar/ (stored 0%)
  adding: Configurations2/menubar/ (stored 0%)
  adding: Configurations2/statusbar/ (stored 0%)
  adding: Configurations2/popupmenu/ (stored 0%)
  adding: Configurations2/accelerator/ (stored 0%)
  adding: Configurations2/accelerator/current.xml (stored 0%)
  adding: Configurations2/floater/ (stored 0%)
  adding: Configurations2/toolpanel/ (stored 0%)
  Copying  GCAMT_in.odt
  Resetting wd
  Removing  /tmp/RtmpAwd1Bm/odfWeave12095551677

  Done



More information about the R-help mailing list