# NOT RUN {
data(city)
# Take a sample of 10 PSU.
(selected_psu <- SamplePPS(psu.ssu = city[, c("track_id", "hh")], psu = 10))
## 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.
# }
# NOT RUN {
MapkmlPSU(shape = "35SEE250GC_SIR",
psu = selected_psu[, "selected.psu"],
id = "CD_GEOCODI", path = shp_path)
## Define the shape argument as an object x of class SpatialPolygonsDataFrame.
MapkmlPSU(shape = x, psu = selected_psu[, "selected.psu"], id = "CD_GEOCODI")
# }
Run the code above in your browser using DataLab