## Not run:
#
# imap(list(world.h.land, world.h.lake, world.h.island, world.h.pond.in.island, world.h.rivers))
#
# # The works with full resolution; high-end computers only.
# imap(list(world.f.land, world.f.lake, world.f.island, world.f.pond.in.island, world.f.borders, world.f.rivers),
# col=c("black", "blue", "forestgreen", "dodgerblue", "cyan", col.alpha('magenta', alpha = 0.5)),
# poly = c("grey50", "blue", "forestgreen", "dodgerblue", NA, NA))
#
#
# # The function below will plot selected polygons from 'world.h.land'.
# imap.world <- function (x = 1:20, poly = rainbow(n), ...)
# {
#
# n <- length(x)
# a <- 0
# polys <- vector("list", n)
# land.index <- (1:nrow(world.h.land))[is.na(world.h.land[,1])]
#
# for (i in 1:n)
# polys[[i + a]] <- world.h.land[land.index[x[i]]:land.index[x[i] + 1], ]
#
#
# imap(polys, col = 'black', poly = poly, keep.attr = TRUE, ...)
#
# invisible(polys)
# }
#
# imap.world()
#
# imap.world(c(5,4,30,50))
#
# ## End(Not run)
Run the code above in your browser using DataLab