Hi all:
I am trying to modify or remove some value label (bold labels) that are easily made with elabel (SSC), but lamentably show some undesired characters in my tables.
I got the .dta database with this bold labels...
Could you help me to remove whith the last character?
Thanks in advance
Rodrigo
I am trying to modify or remove some value label (bold labels) that are easily made with elabel (SSC), but lamentably show some undesired characters in my tables.
I got the .dta database with this bold labels...
Code:
sysuse auto elabel define (foreign) (= #) (= "{bf:" + @ + "}") , modify label list tab foreign 0 {bf:Domestic} 1 {bf:Foreign} . tab foreign Car origin | Freq. Percent Cum. --------------+----------------------------------- {bf:Domestic} | 52 70.27 70.27 {bf:Foreign} | 22 29.73 100.00 --------------+----------------------------------- Total | 74 100.00 I am able to remove first 3 characters, but last character I failed: elabel define * (= #) (= substr(@, strpos(@, "bf:")+3,.)) , modify label list tab foreign 0 Domestic} 1 Foreign} . . tab foreign Car origin | Freq. Percent Cum. ------------+----------------------------------- Domestic} | 52 70.27 70.27 Foreign} | 22 29.73 100.00 ------------+----------------------------------- Total | 74 100.00 Here I failed: elabel define * (= #) (= subinstr(@, "}" "", .)), modify invalid syntax
Thanks in advance
Rodrigo
Comment