Dear All, Is there any other way (say, one line command) to obtain `a' as below.
Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input str4 y
"Y"
"N"
end

label define a 1 "Y" 0 "N"
encode y, gen(a)
Thanks.