Skip to content

odfWeave error

2 messages · Cleber N.Borges, Emmanuel Charpentier

#
hello all,
I trying to use the package 'odfWeave'
and I get the follow error:



###  error message
#############################################################
...
  Removing content.xml

  Post-processing the contents
Error in .Call("RS_XML_Parse", file, handlers, as.logical(addContext),  :
  Error in the XML event driven parser for content_1.xml: error parsing 
attribute name



The piece of the code is:

###  code
############################################################
...

<<makeGraph, echo=T, results=xml>>=
fileplot='C:\\DADOS\\tmp\\plotx.emf'
win.metafile(fileplot)
plot( rnorm(300), col='red', t='l', lwd=2 ); grid()
dev.off()
@

<<insertGraph, echo=T, results=xml>>=
odfInsertPlot(file=fileplot, height=5, width=5 )
@




[[replacing trailing spam]]
Cleber Borges

### sessionInfo
############################################################
 >
 > sessionInfo()
R version 2.6.1 (2007-11-26)
i386-pc-mingw32

locale:
LC_COLLATE=C;LC_CTYPE=C;LC_MONETARY=Portuguese_Brazil.1252;LC_NUMERIC=C;LC_TIME=Portuguese_Brazil.1252

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  
methods   base    

other attached packages:
[1] MASS_7.2-38    odfWeave_0.6.0 XML_1.93-2.1   lattice_0.17-2

loaded via a namespace (and not attached):
[1] rcompgen_0.1-17 tools_2.6.1   
 >



	

	
		
_______________________________________________________ 

Experimente j? e veja as novidades.
#
Cleber N. Borges a ?crit :
???? This chunk is pure R code and shouldn't output anything directly in
the output file. Since you are telling "echo=T', whatever is output by
your code is sent to your output file, and since you assert
"results=xml",this output is interpreted as xml ; since this isn't XML,
your're getting guff from the XML interpreter.

I'd rather do :
<<makeGraph, echo=FALSE>>=
invisible({
# Whatever you did ...
})
@
instead. Your second chunk :
should insert your plot in the output file.

[Snip ... ]

BTW : Windows (enhanced) metafile are Windows-specific. As far as I can
tell, recent versions of Office and OpenOffice.org correctly render
Encapsulated Postcript files, thus freeing you from another Windows
demendency. Unless you *have* to have an EMF output (it happens, I know
...), youd'better use use this format directly.

HTH

					Emmanuel Charpentier