I am using this code using the package mapdata, however it only show the three countries I have selected, and I cannot see the rest of the world´s map boundaries.
map("world",
regions=c("ethiopia", "kenya", "uganda"),
exact = TRUE,
fill=TRUE,
col=c(1,2,3))
How can I show the rest of the world's map boundaries while highlighting my three selected countries?
Here is an example without rworldmap:
require(mapdata)
# get the names
cc <- map('world', names = TRUE, plot = FALSE)
take <- unlist(sapply(c("ethiopia", "kenya", "uganda"), grep, tolower(cc), value = TRUE))
# world
map()
# add the selected countries in grey to the plot
map('world', regions=take, fill=TRUE, col='grey50', add = TRUE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With