Learn R Programming

areaOfEffect (version 0.2.4)

get_country: Get Country Polygon by Name or ISO Code

Description

Quick accessor for country polygons from the bundled dataset.

Usage

get_country(x)

Value

An sf object with the country polygon, or error if not found.

Arguments

x

Country name, ISO2 code, or ISO3 code (case-insensitive)

Examples

Run this code
get_country("Belgium")
get_country("BE")
get_country("BEL")

Run the code above in your browser using DataLab