Is it possible to rename a variable using regex?
Let's say I have a variable:
g wth_t1_xxx = .
Is it possible to rename this variable using a regular expression so that it would be wth_xxx_t1? I'm looking for a pattern to capture the content between the underscores and move to the end, while taking the content at the end and move it to the middle.
Related Posts with Rename using regex?
Calculate normalized euclidean distanceHi all, The Euclidean distance matrix could be obtained by using Code: use http://www.stata-press.…
no room to add more variablesHi, I am using PSID data set. I believe it is a very large data set. Stata tells me: no room to add…
Reshaping data from wide to long panel-dataGood day, I recently reshaped my dataset from wide to long into balanced panel dataset. Clyde Schec…
Bootstrap with 2 way fixed effects in panel data using reghdfeDear Statalist, I am estimating a model of House Price shocks on divorce rates. I am using the regh…
Recoding Values of A Variable based on conditionsHello, I am stuck with a problem. I hope someone can help me to find the answer. The first part of t…
Subscribe to:
Post Comments (Atom)
0 Response to Rename using regex?
Post a Comment