I have been working on creating a scatter plot using the ggflags packages but I've been having issues with it. There is no flags showing on my plot. I have googled the warning messages and most people say it's because either there are NAs in the data or it has something to do with y/xlim. I tried both but still not working. May be there is something else I did wrong.Can someone help me out?
Below is my code#########################################
library(ggflags)
forRegions <- read_excel("180810_60 CountriesByRegion_EpiSdgi.xlsx",
sheet = "duplicate")
forRegions<- forRegions[,c(1:3)] #extract first 3 columns
oce0101 <- read_excel("EPI Analysis.xlsx", sheet = "EPI duplicate")
oce0102<- oce0101[,c(2,3,23)] #extract mpa index column
oce0103<- merge(oce0102,forRegions,by= 'iso') #to include regions
df=data.frame(oce0103)
library(countrycode)
code=countrycode(df$country,"country.name","iso2c")
df$country=sample(c(code))
#df[df==0]=NA
#na.omit(df)
df <- na.omit(df)
ggplot(df,aes(x=Region,y=MPA.current,country=country,size=Region))+
geom_flag(aes())+
#scale_country()+
# scale_size(range=c(0,15))+
scale_x_discrete(limits =c(0,100))+
scale_y_continuous(limits =c(0,110))
#