[R] trying to run odfWeave()

Max Kuhn mxkuhn at gmail.com
Wed Mar 11 15:05:49 CET 2009


>  Unzipping ODF file using unzip -o "SampleOdf.odt"
> Erreur dans odfWeave(file.in, file.out) : Error unzipping file
> De plus : Warning message:
> In system(zipCmd[2], invisible = TRUE) : unzip introuvable

I get this question about twice a week.

Look at the help file. ?odfWeave says:

"Since ODF files are compressed archives of files and directories, R
will need to zip and unzip the source file. While R has an unzip
utility, it does not have one for re-zipping files, so an external
application is needed. unzip and zip are free utilities located at

http://www.info-zip.org/"

> Then, I have a second question, which totally independent from the one above (I have an error in both cases...) : is RepportOdf.odt automatically generated/created or should I create the document before ?

You will need to create an odt document with the R code in it, then

   odfWeave(inFile, outFile)

will take the input odt file and produce an output odt file. Please see:

   http://www.r-project.org/conferences/useR-2007/program/presentations/kuhn.pdf

for an idea of how it works.

And read the posting guide.

Max




More information about the R-help mailing list