Dear Experts,
I have a simple code:
Which gives me a result:
However i need to get a text string which looks like macro as end result, (see below):
`Coating1' * `PumpStatus' * `EX'
I tried to manipulate with ` and ' putting them to
between the lines. as well as inserting into "*", but it reads them as macro afterwards which does not exist ("`*'" results in "" (nothing))
The reson is that later i would like to insert it to the graph function which will multiply the slope by the macro number.
Something like:
Thank you for your time in advance.
Pavlo
I have a simple code:
Code:
unab var_of_interest: Coating1 PumpStatus EX foreach var of varlist `var_of_interest' { global var_of_interest_mult = "$var_of_interest_mult" + "*" + "`var'" } di "$var_of_interest_mult"
Which gives me a result:
Code:
.di "$var_of_interest_mult" * Coating1 * PumpStatus * EX
`Coating1' * `PumpStatus' * `EX'
I tried to manipulate with ` and ' putting them to
Code:
global var_of_interest_mult = "$var_of_interest_mult" + "*" + "`var'"
The reson is that later i would like to insert it to the graph function which will multiply the slope by the macro number.
Something like:
Code:
(function y = (`main') * $var_of_interest_mult, range(`x1_`i'' `x2_`i''))
Pavlo
Comment