# Load data with the polygon identifiers.
data(psu.ssu)
# Take a sample of 10 PSU with probability
# proportional to size with replacement.
(selected.psu <- SamplePPS(psu.ssu, 10, write = FALSE))
## Define shape from shapefile.
shp.path <- system.file('extdata', package="capm")
# The code above used a shapefile avaliable in the
# capm package.
# You might want to write a code like:
# shp.path <- 'path_to_the_folder_with_the_shapefile'
# Create *kml files of 10 polygons.
# Uncomment the following line to create kml files:
# MapkmlPSU('santos', selected.psu[, 1], 1, shp.path)
## Define the shape argument as an object x of class SpatialPolygonsDataFrame.
# MapkmlPSU(x, selected.psu[, 1], 1)
Run the code above in your browser using DataLab