[R-sig-Geo] plot overlay two spatialpolygons.

2010-08-04 Thread Nikhil Kaza
How can I overlay two spatialpolygons and plot them? The following produces two maps since a new plot is called. I understand that if it is any other type, we can simply call lines or points and overlay them on polygons. e.g. library(sp) ## plot of SpatialPolygonsDataFrame, using grey

Re: [R-sig-Geo] plot overlay two spatialpolygons.

2010-08-04 Thread Michael Sumner
Try add = TRUE with the second plot: library(sp) ## plot of SpatialPolygonsDataFrame, using grey shades library(maptools) nc1 - readShapePoly(system.file(shapes/sids.shp, package=maptools) [1], proj4string=CRS(+proj=longlat +datum=NAD27)) names(nc1) rrt - nc1$SID74/nc1$BIR74 brks - quantile(rrt,

Re: [R-sig-Geo] computing the hat matrix for gwr in spgwr?

2010-08-04 Thread Roger Bivand
On Wed, 4 Aug 2010, Seth J Myers wrote: Hi, I'm trying to calculate the hat matrix for gwr by hand using matrix manipulation in R. The hope is that once I get it to match the output that gwr gives, I can do the matrix algebra row-/column-wise. This will allow me to estimate the effective