具体要求就像这样:
Based on the information contained in variable flat type (也就是原str16的变量)to generate the number of rooms(也就是新需要的数值型新变量),assume there are 6 rooms in EXECUTIVE apartments and 7 rooms in MULTI-GENERATION apartments.
然后数据大致是要把3 ROOM变成3,4 ROOM变成4,5 ROOM变成5,EXECUTIVE变成6,MULTI-GENERATION变成7.我已经做了encode flat_type, gen (nb)
gen id=0
但是在 replace id=3 if nb =="3 ROOM"的时候总是显示type mismatch r(109); 这是怎么回事呢