[R-sig-Geo] sp 1.0-0 package: sp.polygons in levelplot behaviour

Edzer Pebesma edzer.pebesma at uni-muenster.de
Wed Oct 10 10:45:53 CEST 2012


sp-1.0-1, which fixes this, is now on CRAN.

On 10/06/2012 07:06 PM, Edzer Pebesma wrote:
> Jonathan, thanks for the clear bug report.
> 
> The old (correct) behaviour is obtained when you set
> 
> set_Polypath(FALSE)
> 
> right after loading sp.
> 
> The corrected sp.polygons is on r-forge, and will be in the next release
> of sp.
> 
> On 10/05/2012 05:58 AM, Jonathan wrote:
>> Hello all, 
>>
>> I updated my version of sp to 1.0-0 today and am getting a different
>> behaviour when using levelplot and sp.polygons.  The polygons do not appear
>> to be terminating when I run the following code.  Anyone else have this
>> problem?  It does seem to work if I use spplot though.  I have previous code
>> that uses lattice::levelplot and rasterVis::levelplot which I can modify to
>> spplot but would rather not have to.
>>
>> library(sp)
>> library(maptools)
>> library(lattice)
>> library(raster)
>> library(rasterVis)
>>
>> nc <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
>> proj4string=CRS("+proj=longlat +datum=NAD27"))
>> r <- raster(nc)
>> r[] <- 1
>> levelplot(r,
>>               panel = function(x,y,z,col.regions,subscripts,region,...){
>>                  panel.levelplot.raster(x, y, z, subscripts=subscripts)
>>                  sp.polygons(nc)
>>                }
>> )
>>
>>
>> Thank you,
>> Jonathan
>>
>> sessionInfo()
>> R version 2.15.1 (2012-06-22)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>
>> locale:
>>  [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
>> LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
>> LC_MONETARY=en_CA.UTF-8   
>>  [6] LC_MESSAGES=en_CA.UTF-8    LC_PAPER=C                 LC_NAME=C                 
>> LC_ADDRESS=C               LC_TELEPHONE=C            
>> [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       
>>
>> attached base packages:
>> [1] grid      stats     graphics  grDevices utils     datasets  methods  
>> base     
>>
>> other attached packages:
>> [1] rasterVis_0.11-01   hexbin_1.26.0       latticeExtra_0.6-24
>> RColorBrewer_1.0-5  raster_2.0-12       maptools_0.8-16     lattice_0.20-10    
>> [8] foreign_0.8-50      sp_1.0-0           
>>
>> loaded via a namespace (and not attached):
>> [1] tools_2.15.1 zoo_1.7-7   
>>
>>
>>
>> --
>> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/sp-1-0-0-package-sp-polygons-in-levelplot-behaviour-tp7581148.html
>> Sent from the R-sig-geo mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list