Dear all,

I have a sequence of polygons as the example below. As the number of
polygons will change every time, I would like to add a new object of class
"Polygons" to a SpatialPolygons. Look that on the last time I try to add a
new "Polygons" and get an error. How can I do dat?

Kind regards,

miltinho

-----

require(maptools)
my.pol1<-cbind(x=c(3,7,7,3,3),y=c(2,2,6,6,2))
my.pol2<-cbind(x=c(6,9,9,6,6),y=c(4,4,9,9,4))
my.pol3<-cbind(x=c(7,10,10,7,7),y=c(2,2,8,8,2))


my.pol1.Sr <- Polygons(list(Polygon(my.pol1)), ID="1")
my.pol2.Sr <- Polygons(list(Polygon(my.pol2)), ID="2")
my.pol3.Sr <- Polygons(list(Polygon(my.pol3)), ID="3")

my.pols.SpatPol.partial <- SpatialPolygons(list(my.pol1.Sr,my.pol2.Sr))

my.pols.SpatPol.complete <- SpatialPolygons(list(my.pols.SpatPol.partial,
my.pol3.Sr))

	[[alternative HTML version deleted]]


