Learn R Programming

geomaroc (version 0.1.1)

getProvince: Plot provinces within a region

Description

Helps to plot the shape of provinces within a region.

Usage

getProvince(n_region = NULL, id = NULL)

Arguments

n_region

The name of the region to plot. The notation should be respected.To get the notation : regions()

id

Each region has an id. To get the id of each region : regions()

Value

return a sf object

Examples

Run this code
# NOT RUN {
#Use region name
region=getProvince("Tanger-Tetouan-Al-Hoceima")
plot(region$coordinates)
#Use id
region=getProvince(id=1) #Don't forget getRegion(id=1) not getRegion(1)
plot(region$coordinates)
# }

Run the code above in your browser using DataLab