# NOT RUN {
library(dplyr)
library(amapGeocode)
# Before the `getAdmin()` is executed,
# the token should be set by `option(amap_key = 'key')`
# or set by key argument in `getAdmin()`
# Get subordinate administrative regions as a XML
getAdmin("Sichuan Province", output = "XML") %>%
# extract subordinate administrative regions as a data.table
extractAdmin()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab