# NOT RUN {
data("psu_ssu")
# Take a sample of 5 PSU.
(selected_psu <- SamplePPS(psu.ssu = psu_ssu, psu = 5))
## Define shape from shapefile.
shp_path <- system.file("extdata/35SEE250GC_SIR.shp", 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 = shp_path,
psu = selected_psu[, "selected_psu"],
id = "CD_GEOCODI")
## Define the shape argument as an object x of class sf.
x <- read_sf(shp_path)
MapkmlPSU(shape = x, psu = selected_psu[, "selected_psu"], id = "CD_GEOCODI")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab