I use StataNow/SE 19.5 and have been using this process of loading the needed unicode characters via local macro from a do file holding all of these within local macros (in an include do file) for downstream use in dtable docx outputs, inline putdocx results and figures.
Is this the best way, or, can unicode characters be represented directly somehow end to end within Stata?
I was planning on storing variable level labels and levels in an excel file which supports unicode symbols and culling from that instead of a do file. I generate some figures in R and was thinking excel->json->R with direct unicode is feasible but for tables and survival graphs I use Stata. See below for current workflow which is working otherwise.
-----------------------------------------------------------------------------------------------------------------------------------------------
Value label age60lab
-----------------------------------------------------------------------------------------------------------------------------------------------
Values Labels
Range: [0,1] String length: [7,9]
N: 2 Unique at full length: yes
Gaps: no Unique at length 12: yes
Missing .*: 0 Null string: no
Leading/trailing blanks: no
Numeric -> numeric: no
Definition
0 ≤60 yrs
1 >60 yrs
Is this the best way, or, can unicode characters be represented directly somehow end to end within Stata?
I was planning on storing variable level labels and levels in an excel file which supports unicode symbols and culling from that instead of a do file. I generate some figures in R and was thinking excel->json->R with direct unicode is feasible but for tables and survival graphs I use Stata. See below for current workflow which is working otherwise.
Code:
local le = ustrunescape("\u2264")
local gt = ustrunescape("\u003E")
cap label drop age60lab
label define age60lab 0 "`le'60 yrs" ///
1 "`gt'60 yrs"
labelbook
-----------------------------------------------------------------------------------------------------------------------------------------------
Value label age60lab
-----------------------------------------------------------------------------------------------------------------------------------------------
Values Labels
Range: [0,1] String length: [7,9]
N: 2 Unique at full length: yes
Gaps: no Unique at length 12: yes
Missing .*: 0 Null string: no
Leading/trailing blanks: no
Numeric -> numeric: no
Definition
0 ≤60 yrs
1 >60 yrs

Comment