CountryID {psData} | R Documentation |
Function for creating standardised country names and ID variables
Description
Function for creating standardised country names and ID variables based on
capabilities from the countrycode
package. The function also
reports if duplicated country IDs have been created and lets the user either
drop these or return only duplicated values for inspection.
Usage
CountryID(data, countryVar = "country", OutCountryID = "iso2c",
standardCountryName = TRUE, duplicates = "message", timeVar = NULL,
fromLast = FALSE)
Arguments
data |
a data frame object |
countryVar |
character string naming the country.name variable. See
|
OutCountryID |
character string. The type of country ID you would like
to include in the output file along with the country name. See
|
standardCountryName |
logical. Whether or not to standardise the country
names variable based on |
duplicates |
character string specifying how to handle duplicated
country or country-time observations (for the latter see |
timeVar |
character string indicating the name of a time variable. For
example, country time series often have separate rows based on a |
fromLast |
logical indicating if duplication should be considered from
the reverse side. Only relevant if |