Inverse of irw_recode(): maps codes such as I0001 back to the
original identifier values using the recode key.
Arguments
- x
A data frame returned by
irw_recode(), or derived from one (including the wide result ofirw_long2resp()).- key
A recode key as returned by
irw_recode_key(). Defaults to the key attached tox; supply it explicitly if the attribute was dropped.- cols
Character vector of columns to decode. Defaults to all columns present in both
xand the key.
Details
Works on long-format data (columns named in the key are decoded in place) and
on the wide output of irw_long2resp(), where item codes appear as
column names. irw_long2resp() prefixes item columns with
item_; that prefix is handled and preserved. Values or column names
that are not found in the key are left untouched.