[R-sig-Geo] Problem with Sweave and spplot

Virgilio Gómez-Rubio Virgilio.Gomez at uclm.es
Tue Sep 1 17:23:10 CEST 2009


Hi,

> I'm facing problems using Sweave with spplot... there is no error
> message but the pdf produced has errors and then latex compilation
> fails... I really don't know where that come from, did anyone
> experience something similar?

Have you embedded the spplot() function inside a print() function.
Lattice graphics need to be printed() inside Sweave. Something like:

print(spplot(mymap, "mydata"))

Otherwise I believe that you will get some PDF files but they will be
empty or borken.

Best wishes,

Virgilio


> I've put the file on the net:
> -the Sweave file:
> http://s000.tinyupload.com/download.php?file_id=06883775011103568715&t=0688377501110356871533520
> -the map data: http://s000.tinyupload.com/download.php?file_id=77859174637181270102&t=7785917463718127010263143
> 
> So after downloading oe should just run:
> R
> Sweave("WorkingPaper2.Rnw.txt")
> 
> Would you be so nice to test it and tell further:
> -Do you have errors?
> -Is Sweave running but not providing pdf not working?
> 
> Thanks a lot
> 
> Matthieu Stigler
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list