Hot answers tagged

1

A simple function can do that for you. Here's how: allKmlLayers <- function(kmlfile){ lyr <- ogrListLayers(kmlfile) mykml <- list() for (i in 1:length(lyr)) { mykml[i] <- readOGR(kmlfile,lyr[i]) } names(mykml) <- lyr return(mykml) } use it with: kmlfile <- "se\\file.KML" mykml <- allKmlLayers(kmlfile)



Only top voted, non community-wiki answers of a minimum length are eligible