Skip to contents

[Deprecated]

This function is deprecated. This function is a default for derive_vars_disposition_reason() for the format_new_vars argument. Please use derive_vars_merged() and specify the filter_add argument to derive the respective variables.

Define a function to map the disposition reason, to be used as a parameter in derive_vars_disposition_reason().

Usage

format_reason_default(reason, reason_spe = NULL)

Arguments

reason

the disposition variable used for the mapping (e.g. DSDECOD).

reason_spe

the disposition variable used for the mapping of the details if required (e.g. DSTERM).

Value

A character vector

Details

format_reason_default(DSDECOD) returns DSDECOD when DSDECOD is not 'COMPLETED' nor NA.
format_reason_default(DSDECOD, DSTERM) returns DSTERM when DSDECOD is equal to 'OTHER'.
Usually this function can not be used with %>%.