map_iso3166: Map answer codes

View source: R/mapIso3166.R

map_iso3166R Documentation

Map answer codes

Description

Maps country answer codes between different translated version of the GEAM questionnaire. Nationality or country selection choices in a survey are usually listed alphabetically. For translated versions this can be a problem as the answer codes for countries do not match. For example. "L013" is the answer code for Hungary in the English version while "L026" is the answer code for "Wegry" (i.e. Hungary) in the Polish version.

When labeling the answers that use country codes, one has to bear in mind that answer codes need to be matched with the target language. For example, a questionnaire exists in English and Spanish. When labelling the result data in Spanish (to produce a Spanish report), the English submissions need to be recodified as answer codes do not match. In case result data needs to be labelled in English, the Spanish submissions need to be recodified to make sure that answer codes refer to the same items (countries).

Usage

map_iso3166(isofrom, isoto, alabels, lqid)

Arguments

isofrom

String code of source language code (e.g. "pl", "de", "en") to be converted

isoto

String code of target language

alabels

Data frame of all answer labels extracted from LS survey archive file

qid

ID of associated LS question for answer labels.

Value

data frame with four columns containing the answer code in the source language, and the corresponding answer code in the target language.


jmueller17/LimeRLabel documentation built on May 2, 2023, 7:13 p.m.