byContinent {r2country} | R 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)
[Package r2country version 2.0.2.4.0 Index]