Function rename_gcdg_gsed()
translates item names in the
gcdg lexicon to item names in the gsed lexicon.
rename_gcdg_gsed(x, copy = TRUE)
A character vector containing item names in the gcdg lexicon
A logical indicating whether any unmatches names should
be copied (copy = TRUE
) or set to an empty string.
A character vector of length length(x)
with gcdg
item names replaced by gsed item name.
The gsed-naming convention is as follows. Position 1-3 codes the instrument, position 4-5 codes the domain, position 6 codes direct/caregiver/message, positions 7-9 is a item sequence number.
The function currently support ASQ-I (aqi), Barrera-Moncade (bar), Batelle (bat), Bayley I (by1), Bayley II (by2), Bayley III (by3), Dutch Development Instrument (ddi), Denver (den), Griffith (gri), MacArthur (mac), WHO milestones (mds), Mullen (mul), pegboard (peg), South African Griffith (sgr), Stanford Binet (sbi), Tepsi (tep), Vineland (vin).
In cases where the domain of the items isn't clear (vin, bar), the domain is coded as 'xx'.
https://docs.google.com/spreadsheets/d/1zLsSW9CzqshL8ubb7K5R9987jF4YGDVAW_NBw1hR2aQ/edit#gid=0
from <- c(
"ag28", "gh2_19", "a14ps4", "b1m157", "mil6",
"bm19", "a16fm4", "n22", "ag9", "gh6_5"
)
to <- rename_gcdg_gsed(from, copy = FALSE)
to
#> [1] "aqigmc028" "grihsd219" "" "by1mdd157" "mdsgmd006" "barxxx019"
#> [7] "" "ddigmm060" "aqigmc009" "grihsd605"