Learn R Programming

FAOSTAT (version 2.4.0)

fillCountryCode: A function to get country code when not available in data.

Description

This function can be useful when a dataset provided does not have a country code available.

Usage

fillCountryCode(country, data, outCode = "FAOST_CODE")

Arguments

country

The column name of the data which contains the country name

data

The data frame to be matched

outCode

The output country code system, defaulted to FAO standard.