continentOf: Fetch the continent of a country

continentOfR 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")]


r2country documentation built on Sept. 11, 2024, 9:24 p.m.