byContinent: Fetch countries by continent

View source: R/subsetted.R

byContinentR Documentation

Fetch countries by continent

Description

Obtain country data matching language first one or more letters

Usage

byContinent(
  name = c("asia", "europe", "africa", "north america", "south america", "oceania"),
  full.list = TRUE
)

Arguments

name

name of continent

full.list

whether to return only name of country or full list

Details

Note that choices for names of continent includes 'asia','europe','africa','north america','south america','oceania'

Value

country data list matching continent

Examples

# task 1: get only names of countries that contains with "africa" or "AFrica"
# note that the search in case-insensitive
byContinent("africa", full.list = FALSE)

# task 2: get only names of countries that contains with "ASIA" or "asia"
byContinent("asia", full.list = FALSE)

# task 3: repeat task 2, but return full list for each country
byContinent("europe", full.list = TRUE)


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