Hello Max,

Thanks for your help.
So, I changed the << >>= with

<<carte2, echo = FALSE, results=XML, fig = TRUE>>=


So , now I can open the output file .odt, but it plot only the last map
and not all the maps.
But on the R graphics window, i can see the several maps overwrite each 
other.
Maybe there is something wrong in my loop?

I attached to this message a file with 2 projects, on different points 
to map foreach projects


Thanks,

Laurence


here is the code:

<<Connection, echo = FALSE, results=XML >>=

library("RMySQL")
library(maps)
library(mapdata)
library(spmaps)
library(grid)
library(plotrix)

drv <- dbDriver("MySQL")

con <- dbConnect(drv, user="user", password="****", dbname="Aquagenome", 
host="toulouse.inra.fr", client.flag="CLIENT\_MULTI\_STATEMENTS")

@

Liste des projets:

<<carte2, echo = FALSE, results=XML, fig = TRUE>>=

lp <- dbSendQuery(con, "SELECT nom FROM projets")
projets <- fetch(lp)
nbr=dim(projets)[1]

for (i in 1:nbr)

{
    monprojet=(projets)[i,1]
    myquery=paste("SELECT s.longitude, s.latitude, o.orgashort FROM 
organisme o JOIN scientist s ON o.codeorga=s.codeorga JOIN partenaire p 
ON p.codescientist=s.codescientist JOIN projets ON 
projets.codeproj=p.codeproj WHERE projets.nom LIKE \'",monprojet,"\' 
ORDER BY s.longitude", sep="")

    rs <- dbSendQuery(con, myquery)
    df <- fetch(rs)

    map(database="world", xlim=c(-15,40),ylim=c(27,71), fill=TRUE, 
col="#FFFFCC")
    points(df$longitude,df$latitude, col="red", pch=16)
    spread.labels(df$longitude,df$latitude,df$orgashort,0,bg="#CCFFFF", 
border=TRUE, cex=0.8, xpad=0.5, ypad=0.8, font=6)

}

@

toto




Here is the result of the sessionInfo()

 > sessionInfo()
R version 2.5.0 (2007-04-23)
i686-pc-linux-gnu

locale:
LC_CTYPE=fr_FR@euro;LC_NUMERIC=C;LC_TIME=fr_FR@euro;LC_COLLATE=fr_FR@euro;LC_MONETARY=fr_FR@euro;LC_MESSAGES=fr_FR@euro;LC_PAPER=fr_FR@euro;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=fr_FR@euro;LC_IDENTIFICATION=C

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

other attached packages:
 plotrix   spmaps       sp  mapdata     maps   RMySQL      DBI odfWeave
   "2.2"  "0.1-4" "0.9-13" "2.0-20" "2.0-36" "0.5-11"  "0.2-3"  "0.4.9"
 lattice
"0.15-4"

Kuhn, Max a écrit :
> Laurence,
>
> I haven't seen any issues like this. Can you:
>
>   1. Send the results of sessionInfo()
>
>   2. Try using <<carte2, echo = FALSE, results= xml, fig = TRUE>>=. It
> sounds like the text being written to the xml file is not valid xml.
> This could be the case if results != xml.
>
>   3. If that doesn't work, send me a data object and the odt file so
> that I can try to reproduce the error?  
>
> Max
>
> ----------------------------------------------------------------------
> LEGAL NOTICE
> Unless expressly stated otherwise, this message is confidential and may be privileged.  It is intended for the addressee(s) only.  Access to this E-mail by anyone else is unauthorized.  If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful.  If you are not an addressee, please inform the sender immediately.
>   


-- 
====================================================================
= Laurence Amilhat    INRA Toulouse 31326 Castanet-Tolosan     	   = 
= Tel: 33 5 61 28 53 34   Email: laurence.amilhat@toulouse.inra.fr =
====================================================================




	[[alternative HTML version deleted]]

