Skip to content

Instantly share code, notes, and snippets.

View Jianghao's full-sized avatar

Jianghao Wang Jianghao

View GitHub Profile
library(maps)
library(shiny)
library(stringr)
worlddf <- map("world")
# restrict selection to coutries only
locations <- worlddf$names
countries <-subset(locations,is.na(str_locate(locations,":")))