I am trying to map a bunch of countries with the following code.
require(mapdata)
# get the names
cc <- map('world', names = TRUE, plot = FALSE)
take <- unlist(sapply(c("iran", "malaysia", "saudi arabia", "united arab emirates", "kuwait", "bahrain", "indonesia", "qatar", "sudan", "pakistan", "bangladesh", "turkey", "egypt", "united kingdom", "jordan", "brunei", "sri lanka", "oman", "yemen", "lebanon", "kenya"), grep, tolower(cc), value = TRUE))
suppressWarnings(map())
suppressWarnings(map('world', regions=take, fill=TRUE, col='red', add = TRUE))
I get what I want, however, the Pdf version has the following warning printed on page
#### # maps v3.1: updated 'world': all lakes moved to separate new ### # 'lakes' database. Type '?world' or 'news(package="maps")'. #
I use suppressWarnings, but the warning is still printed. How can I hide this when I knit the document with knitr?