This function repairs and standardizes responses data after being read by
read_gsed_fixed() to ensure that the responses data is in a consistent
format.
Details
The function performs several operations:
Converts 1–2 digit country codes to 3-digit format (e.g.,
11-GSED-0123→011-GSED-0123).Converts
GSED-0123to528-GSED-0123.Standardizes specific country codes (e.g.,
011-to050-,017-to586-,020-to834-).Deduplicates responses based on a unique identifier consisting of
subjid,agedays,vist_type, anditem.
The function is to be run after read_gsed_fixed()
A unique response identifier consists of: subjid, agedays, vist_type, item