In this article
Recoding functions recode source values into a number of categories. Input for recoding is either numeric, text or date value. Input value is mapped to a certain output code by means of value recoding or range recoding rules. Result of recoding is a text code representing a category for the input value.
| Function | Description |
| Recode(input_value, recoding) | Recodes an input value according to the specified recoding definition (value recoding or range recoding). The result of recoding is a code to which the input value is mapped. It is assumed that provided recoding rules do not overlap ( so that each value is unambiguously mapped to the output code). If there is overlapping then the function fails. This function can also be applied to a compound input value. In this case it creates a compound output (text list) by applying recoding to each field of the input. |
| MultiRecode(input_value, recoding) | Recodes argument value (of numeric, category, text or date/time type) into a boolean vector according to the specified recoding definition (value recoding or range recoding). In contrast with Recode function ranges/codes in recoding definition can duplicate/overlap. If an argument value matches multiple conditions in recoding definition then corresponding values in the resulting vector will be set to true. This function can only be applied to scalar input values. |