Map character response values like "PR"
or "SD"
to numeric values.
Value
1
ifarg
equals"CR"
,2
ifarg
equals"PR"
,3
ifarg
equals"SD"
,4
ifarg
equals"NON-CR/NON-PD"
,5
ifarg
equals"PD"
,6
ifarg
equals"NE"
,7
ifarg
equals"MISSING"
,NA_real_
otherwise
Examples
aval_resp(c("CR", "PR", "SD", "NON-CR/NON-PD", "PD", "NE", "MISSING", "ND", NA_character_))
#> [1] 1 2 3 4 5 6 7 NA NA