[R] OdfWeave problem

John Kane jrkrideau at inbox.com
Tue Dec 17 16:00:47 CET 2013


I am trying to get odfWeave to work and I seem to be doing something stupid. Straightforward inline statements and plain code chunks are working fine but when I try to use an actual odfWeave statement I get what appears to be the xml and not odt format.  I am using Apache OpenOffice 3. 4.0.  Sys.Info() at bottom.
Suggestions/ pointers appreciated.

In an odt file I tried the following:  The inline statements work, the dat1 chunk works the iris chunk gives me the following.


> odfItemize(levels(iris$Species))
     <text:list text:style-name="Rbullet" > 
     <text:list-item>
      <text:p text:style-name="RbulletParagraph" > setosa     </text:p>
     </text:list-item>
     <text:list-item>
      <text:p text:style-name="RbulletParagraph" > versicolor </text:p>
     </text:list-item>
     <text:list-item>
      <text:p text:style-name="RbulletParagraph" > virginica  </text:p>
     </text:list-item>
    </text:list>

######--------------------------text in AOO file ------------------------------------

 \Sexpr{paste(letters[1:5], collapse = ",")}. Okay so far, so good and π =  \Sexpr{round(pi, 4)}.


<<dat1, echo=FALSE >>=
Participant  <-  c(1,2,3,4,5,6,7,8,9,10)
Condition <-factor(c(1,1,1,1,1,2,2,2,2,2))
Score <- c(4,3,5,4,4,2,2,6,5,6)
Data <- data.frame(Participant,Condition,Score)
Data
@

<<iris , echo = TRUE>>=
odfItemize(levels(iris$Species))
 @
###----------------------------end text in AOO file---------------

##----------------------------------R program----------------
library(odfWeave)
inFile <- "odfWeave.example.odt"
outFile <- "outfile.odt"

odfWeave(inFile, outFile)
#===================================
     
 Sys.info()
                                      sysname                                       release 
                                      "Linux"                           "3.11.0-14-generic" 
                                      version                                      nodename 
"#21-Ubuntu SMP Tue Nov 12 17:07:40 UTC 2013"                                   "john-K53U" 
                                      machine                                         login 
                                       "i686"                                     "unknown" 
                                         user                                effective_user 
                                       "john"                                        "john" 




John Kane
Kingston ON Canada

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!



More information about the R-help mailing list