callingCodeOf | R Documentation |
With specified country name or names, get the associated calling code
callingCodeOf
An object of class list
of length 193.
a list containing all countries and their corresponding calling code
# view the searchable countries, return first 6
head(names(callingCodeOf))
#task 0: check if the calling code of japan is included
#should be all in lower case
grep("japan",names(callingCodeOf), value = TRUE)
#task 1: check the calling code of nigeria
callingCodeOf$nigeria
#task 2: check the calling code of united states
callingCodeOf$`united states`
#task 3: check calling code of multiple countries
callingCodeOf[c("slovenia","romania","malaysia")]
#task 4: what if the calling code is not available
callingCodeOf[c("randomcountry","mexico","luxembourg")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.