if (FALSE) {
library(sp)
library(rworldmap)
world <- getMap(resolution = "coarse")
class(world)
isS4(world)
xy <- spAsList(world)
names(xy)
# because tree has same depth for every leaf unlist is ok
# This is not true otherwise.
uxy <- spunlist(xy)
unlist(xy, recursive=FALSE)
names(uxy)
# here, unlist would be wrong.
}
Run the code above in your browser using DataLab