continentOf {r2country} | R Documentation |
Fetch the continent of a country
Description
Get the continent that a particular country belongs to
Usage
continentOf
Format
An object of class list
of length 193.
Value
a list containing all countries and corresponding continents
Examples
# view the searchable countries, return first 15
names(continentOf)[1:15]
#task 1: view the continent of algeria
continentOf$algeria
#task 2: view the continent of nigeria
continentOf$nigeria
#task 3: view the continent of multiple countries
continentOf[c("niger","china","colombia")]
#task 4: if the continent is not available
continentOf[c("niger","china","randomtest")]
[Package r2country version 2.0.2.4.0 Index]