Dear colleagues,:
I have to work with a database that contains codes that I would like to codify. In order to do that I would like to substituite the certain values inside the variable.
For example:
AD00053
zoC0151
I would like to add at the beginning the characters CL1 and afterwards substitute the letter A for 1 D for 4 and then then the numbers by order per oder numbers. This should be done with a loop, since I need to do it over and over all the observations (+200.000)
Thank you very much for your help
Related Posts with Susbtituting characters or numbers inside a variable
Maximum likelihood estimation with by(sort) commandDear, I hope you are all in good health. I'm estimating the amount of sorting across schools by est…
The matched sample of teffects nnmatchI am interested in obtaining the matched sample (observations in the treatment group that are matche…
Help with dynamic panels (xtabond)Hi all! First time posting here. I am writing research on digitalization in EU28 and its economic …
Storing values to a list and expand the list in each iterationI would like store certain values to a list and drop if certain variable's value is equivalent to th…
"Prob > F" is larger than 0.5 for a single linear regressionArray I am writing a simple linear regression. Inventory data of products are dependent variable P…
Subscribe to:
Post Comments (Atom)
0 Response to Susbtituting characters or numbers inside a variable
Post a Comment