I'm using compound strings to label data that needs to go on two rows on the x-axis of a bar graph. However, if the string contains an ampersand (&), the command gives a "type mismatch" error. This problem only exists if the ampersand is in the compound string.
For example:
works fine, but when I change the "+" to a "&", I get the "type mismatch error":
Is there a way for me to include the ampersand in a compound string?
For example:
Code:
sysuse auto, clear label define rep_label 1 "A&B" 2 `" "first line +" "second line" "' 3 "C" 4 "D" 5 "E" label values rep78 rep_label tab rep78 graph bar price, over(rep78)
Code:
sysuse auto, clear label define rep_label 1 "A&B" 2 `" "first line &" "second line" "' 3 "C" 4 "D" 5 "E" label values rep78 rep_label tab rep78 graph bar price, over(rep78)
Comment