I have string variable curcd. there are two things in it USD or CAD, How can I calculate No of CAD and how can I delete those. codes which I normally use for a numeric variable are not working.
Moreover, how can I create another variable by using it (gen country=1 if curcd==CAD)
count if curcd==CAD
drop of curcd==CAD
Moreover, how can I create another variable by using it (gen country=1 if curcd==CAD)
count if curcd==CAD
drop of curcd==CAD
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str4 curcd "CAD" "USD" "CAD" "CAD" "CAD" "USD" "CAD" "CAD" "CAD" "CAD" end
Comment