I need to plot the names of the countries that are present in my dataframe only, not all world countries. Any suggestions?
library(grid)
library(rworldmap)
q = c("ESP","AND","MCO","VCT","NLD", "LUX", "GBR", "LIE", "BEL","NLD",
"LUX","GBR","DNK","SWE","NOR","ATG","AUS", "BHS", "BHR","BRB",
"BLZ","BTN","BRN","KHM","CAN","SWZ","GRD","JAM","JPN","KWT","JOR","LSO","MYS","MAR","NZL",
"OMN","PNG","QAT","KNA","LCA","VCT","SAU","SLB","THA","TON","TUV","ARE")
DF = data.frame(q = c("ESP","AND","MCO","VCT","NLD", "LUX", "GBR", "LIE", "BEL","NLD",
"LUX","GBR","DNK","SWE","NOR","ATG","AUS", "BHS", "BHR","BRB",
"BLZ","BTN","BRN","KHM","CAN","SWZ","GRD","JAM","JPN","KWT","JOR","LSO","MYS","MAR","NZL",
"OMN","PNG","QAT","KNA","LCA","VCT","SAU","SLB","THA","TON","TUV","ARE"), Assignment = ("Monarchies Worldwide"))
Map = joinCountryData2Map(DF, joinCode = "ISO3", nameJoinColumn ="q", mapResolution = "coarse" )
mapParams = mapCountryData(Map, nameColumnToPlot="Assignment", catMethod = "categorical",
missingCountryCol = gray(.4))
``