Hello,
I am trying to replace a variable so that when I create a graph for GDPpc it shows GDPpc below 20k and above 30k. the starting gdp variable is gdppc
I used: 'generate code_gdppc2 = "" ' to make a string variable, then:
replace code_gdppc2 = code_gdppc if gdppc < 20000
However, when this is run it says 0 real changes made and I cannot for the life of me figure out why.
or to get my desired result I run:
'replace code_gdppc2 = code_gdppc if gdppc < 20000 & gdppc > 30000'
and this says 'code_gdppc ambiguous abbreviation'
what is the way around this?
Apologies if this is classed as an elementary question, I am new here and have no other place to turn for an answer.
Thank you.
0 Response to Trying to replace a variable with a new generated variable
Post a Comment